Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -83,8 +83,11 @@ def getprompt():
|
|
| 83 |
fs = [f for f in fs if not f.startswith('.')]
|
| 84 |
if len(fs) > 0:
|
| 85 |
f = fs[0]
|
| 86 |
-
os.
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
| 88 |
return ""
|
| 89 |
|
| 90 |
@app.route("/putvideo", methods = ['POST'])
|
|
|
|
| 83 |
fs = [f for f in fs if not f.startswith('.')]
|
| 84 |
if len(fs) > 0:
|
| 85 |
f = fs[0]
|
| 86 |
+
ff = os.path.join(prompt_folder, f)
|
| 87 |
+
txt = open(ff).read()
|
| 88 |
+
os.remove(ff)
|
| 89 |
+
d = {'file': f, 'prompt': txt}
|
| 90 |
+
return json.dumps(d)
|
| 91 |
return ""
|
| 92 |
|
| 93 |
@app.route("/putvideo", methods = ['POST'])
|