sreepathi-ravikumar commited on
Commit
5a93262
·
verified ·
1 Parent(s): ed03bce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -11
app.py CHANGED
@@ -9,7 +9,7 @@ import requests
9
  import asyncio
10
  from image_fetcher import main
11
  from video import create_text_image
12
- from video2 import video_com,video_func
13
 
14
  app = Flask(__name__)
15
 
@@ -121,16 +121,7 @@ def generate_video():
121
  os.remove(img)
122
  return send_file(video_link, mimetype='video/mp4')
123
  else:
124
- space_b_url = ['https://sreepathi-ravikumar-subprocess1.hf.space/generate', 'https://sreepathi-ravikumar-subprocess2.hf.space/generate', 'https://sreepathi-ravikumar-subprocess3.hf.space/generate', 'https://sreepathi-ravikumar-subprocess4.hf.space/generate', 'https://sreepathi-ravikumar-subprocess5.hf.space/generate', 'https://sreepathi-ravikumar-subprocess6.hf.space/generate', 'https://sreepathi-ravikumar-subprocess7.hf.space/generate', 'https://sreepathi-ravikumar-subprocess8.hf.space/generate', 'https://sreepathi-ravikumar-subprocess9.hf.space/generate', 'https://sreepathi-ravikumar-subprocess10.hf.space/generate']
125
-
126
- with ThreadPoolExecutor(max_workers=len(lines)) as executor:
127
- for id in range(len(lines)):
128
- executor.submit(send_task,id,space_b_url[id],lines)
129
-
130
- video_path = video_com(lines)
131
- #for img in image_files:
132
- #os.remove(img)
133
- return send_file(video_path, mimetype='video/mp4')
134
  except Exception as e:
135
  traceback.print_exc()
136
  return jsonify({"error": str(e)}), 500
 
9
  import asyncio
10
  from image_fetcher import main
11
  from video import create_text_image
12
+ from video2 import video_func
13
 
14
  app = Flask(__name__)
15
 
 
121
  os.remove(img)
122
  return send_file(video_link, mimetype='video/mp4')
123
  else:
124
+ print("learn deeper")
 
 
 
 
 
 
 
 
 
125
  except Exception as e:
126
  traceback.print_exc()
127
  return jsonify({"error": str(e)}), 500