sreepathi-ravikumar commited on
Commit
b0d8952
·
verified ·
1 Parent(s): efad918

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -62,10 +62,8 @@ def generate_video():
62
  try:
63
  data = request.get_json()
64
  userprompt = data.get("duration", '').strip()
65
- prompt1=extract_english_paragraphs(userprompt)
66
- lang1=extract_native_text(userprompt)
67
- prompt="### current\nCurrent is the flow of electric charge. It moves through a conductor."
68
- lang="Current னு சொல்றது wire ல electron-ங்க move ஆகுற flow தான், சரி, அப்போ electron-ங்கள் நகர்ந்து இருக்காங்க, அப்புறம் அது current ஆகுது, அதனால நம்ம phone charge ஆகுறது இல்லயா, இப்போ யாருமே புரிஞ்சுக்கிட்டு இருப்பாங்க, உதாரணமா, நீங்க உங்க phone லயம் charge பண்ணுது இருக்கீங்க, யோசிச்சு பாருங்க, ஒரு bulb ல லைட் வருறது ஏன்னா current தான், இவ்ளோதான், clear ஆ இருக்கா?&&&Tamil"
69
  prompts=prompt.replace("**","")
70
  print(prompts)
71
  if prompts == '':
@@ -140,10 +138,9 @@ def generate_video():
140
  #if not image_files:
141
  #raise ValueError("No images found in folder!")
142
  video_link = "/app/data/video/clip0.mp4"
143
- videopath=video_func(0,lines,lang)
144
  #for img in image_files:
145
  #os.remove(img)
146
- print(videopath)
147
  return send_file(video_link, mimetype='video/mp4')
148
 
149
  else:
 
62
  try:
63
  data = request.get_json()
64
  userprompt = data.get("duration", '').strip()
65
+ prompt=extract_english_paragraphs(userprompt)
66
+ lang=extract_native_text(userprompt)
 
 
67
  prompts=prompt.replace("**","")
68
  print(prompts)
69
  if prompts == '':
 
138
  #if not image_files:
139
  #raise ValueError("No images found in folder!")
140
  video_link = "/app/data/video/clip0.mp4"
141
+ video_func(0,lines,lang)
142
  #for img in image_files:
143
  #os.remove(img)
 
144
  return send_file(video_link, mimetype='video/mp4')
145
 
146
  else: