microbamboo commited on
Commit
27a0d11
·
verified ·
1 Parent(s): 0cafc24

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -87,9 +87,9 @@ def getprompt():
87
  f = fs[0]
88
  ff = os.path.join(prompt_folder, f)
89
  txt = open(ff).read()
90
- os.remove(ff)
91
  d = {'file': f, 'prompt': txt}
92
- return json.dumps(d)
 
93
  return ""
94
 
95
  @app.route("/putvideo", methods = ['POST'])
@@ -108,7 +108,7 @@ def putvideo():
108
  f.save(local_file_video)
109
  hh.upload_file(path_or_fileobj=local_file_video, path_in_repo=file+'.mp4', repo_id=repo_id_video, repo_type='dataset', token=tt)
110
  hh.upload_file(path_or_fileobj=local_file_prompt, path_in_repo=file, repo_id=repo_id_prompt, repo_type='dataset', token=tt)
111
-
112
  return "ok"
113
 
114
 
 
87
  f = fs[0]
88
  ff = os.path.join(prompt_folder, f)
89
  txt = open(ff).read()
 
90
  d = {'file': f, 'prompt': txt}
91
+ s = f'{f}||||{txt}'
92
+ return s
93
  return ""
94
 
95
  @app.route("/putvideo", methods = ['POST'])
 
108
  f.save(local_file_video)
109
  hh.upload_file(path_or_fileobj=local_file_video, path_in_repo=file+'.mp4', repo_id=repo_id_video, repo_type='dataset', token=tt)
110
  hh.upload_file(path_or_fileobj=local_file_prompt, path_in_repo=file, repo_id=repo_id_prompt, repo_type='dataset', token=tt)
111
+ os.remove(local_file_prompt)
112
  return "ok"
113
 
114