Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -289,10 +289,15 @@ def generate_video():
|
|
289 |
print('preprocess selected: ',preprocess)
|
290 |
ref_pose_video = request.files.get('ref_pose', None)
|
291 |
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
|
|
|
|
|
|
|
|
|
|
296 |
|
297 |
source_image_path = save_uploaded_file(source_image, 'source_image.png',TEMP_DIR)
|
298 |
print(source_image_path)
|
|
|
289 |
print('preprocess selected: ',preprocess)
|
290 |
ref_pose_video = request.files.get('ref_pose', None)
|
291 |
|
292 |
+
if chat_model_used == 'openai':
|
293 |
+
response = openai_chat_avatar(text_prompt)
|
294 |
+
text_prompt = response.choices[0].message.content.strip()
|
295 |
+
app.config['text_prompt'] = text_prompt
|
296 |
+
print('Final output text prompt using openai: ',text_prompt)
|
297 |
+
|
298 |
+
else:
|
299 |
+
app.config['text_prompt'] = text_prompt
|
300 |
+
print('Final output text prompt using openai: ',text_prompt)
|
301 |
|
302 |
source_image_path = save_uploaded_file(source_image, 'source_image.png',TEMP_DIR)
|
303 |
print(source_image_path)
|