Spaces:
Sleeping
Sleeping
Commit
·
d247f5e
1
Parent(s):
80c0e03
update
Browse files- src/demo/views.py +2 -2
src/demo/views.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
# 设置环境变量以解决 Hugging Face Spaces 中的权限问题
|
| 2 |
import os
|
| 3 |
import tempfile
|
|
@@ -33,14 +35,12 @@ else:
|
|
| 33 |
# 本地环境,使用默认设置
|
| 34 |
print("本地环境,使用默认缓存目录")
|
| 35 |
|
| 36 |
-
from __future__ import unicode_literals
|
| 37 |
import sys
|
| 38 |
|
| 39 |
from django.shortcuts import render
|
| 40 |
from django.http import HttpResponse
|
| 41 |
from django.views.decorators.csrf import csrf_exempt
|
| 42 |
from django.core.files.uploadedfile import InMemoryUploadedFile
|
| 43 |
-
import os
|
| 44 |
import json
|
| 45 |
import requests
|
| 46 |
import time
|
|
|
|
| 1 |
+
from __future__ import unicode_literals
|
| 2 |
+
|
| 3 |
# 设置环境变量以解决 Hugging Face Spaces 中的权限问题
|
| 4 |
import os
|
| 5 |
import tempfile
|
|
|
|
| 35 |
# 本地环境,使用默认设置
|
| 36 |
print("本地环境,使用默认缓存目录")
|
| 37 |
|
|
|
|
| 38 |
import sys
|
| 39 |
|
| 40 |
from django.shortcuts import render
|
| 41 |
from django.http import HttpResponse
|
| 42 |
from django.views.decorators.csrf import csrf_exempt
|
| 43 |
from django.core.files.uploadedfile import InMemoryUploadedFile
|
|
|
|
| 44 |
import json
|
| 45 |
import requests
|
| 46 |
import time
|