sreepathi-ravikumar commited on
Commit
b65ffad
·
verified ·
1 Parent(s): 5fd23f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -99,7 +99,7 @@ def generate_video():
99
  return send_file(video_link, mimetype='video/mp4')
100
  else:
101
  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']
102
- for id in range(1,len(lines)+1):
103
  payload = {
104
  "id": id,
105
  "lines": lines
@@ -108,7 +108,7 @@ def generate_video():
108
  # Replace with your actual Space B URL
109
 
110
 
111
- response = requests.post(space_b_url[id], json=payload)
112
 
113
  if response.status_code == 200:
114
  # Save received video file
 
99
  return send_file(video_link, mimetype='video/mp4')
100
  else:
101
  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']
102
+ for id in range(len(lines)):
103
  payload = {
104
  "id": id,
105
  "lines": lines
 
108
  # Replace with your actual Space B URL
109
 
110
 
111
+ response = requests.post(space_b_url[id+1], json=payload)
112
 
113
  if response.status_code == 200:
114
  # Save received video file