Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -521,7 +521,7 @@ async def get_recommendation(new_crop, image_path, openai_api_key, language, aut
|
|
| 521 |
|
| 522 |
def change_naritive(session_type,image_input, state, click_state, paragraph, origin_image,narritive,task_instruct,gallery_output,style_gallery_result,reco_reasons,language="English"):
|
| 523 |
if session_type=="Session 1":
|
| 524 |
-
return None, [], [], [[], [], []], "", None, None, [], [],[],[],gr.update(value="Preview"),
|
| 525 |
else:
|
| 526 |
if language=="English":
|
| 527 |
if narritive=="Narrator" :
|
|
@@ -569,7 +569,7 @@ def change_naritive(session_type,image_input, state, click_state, paragraph, ori
|
|
| 569 |
]
|
| 570 |
|
| 571 |
|
| 572 |
-
return image_input, state, state, click_state, paragraph, origin_image,task_instruct,gallery_output,style_gallery_result,reco_reasons,reco_reasons,gr.update(value="Preview"),
|
| 573 |
|
| 574 |
|
| 575 |
def print_like_dislike(x: gr.LikeData,state,log_state):
|
|
@@ -943,7 +943,7 @@ def create_ui():
|
|
| 943 |
paragraph,artist,gender,image_path, log_state,history_log,output_audio])
|
| 944 |
|
| 945 |
example_image.change(
|
| 946 |
-
lambda:([],[],[],None,[],gr.update(value="Preview"),
|
| 947 |
[],
|
| 948 |
[gallery_result,style_gallery_result,recommend_bot,new_crop_save_path,chatbot,recommend_type,selected_image])
|
| 949 |
|
|
|
|
| 521 |
|
| 522 |
def change_naritive(session_type,image_input, state, click_state, paragraph, origin_image,narritive,task_instruct,gallery_output,style_gallery_result,reco_reasons,language="English"):
|
| 523 |
if session_type=="Session 1":
|
| 524 |
+
return None, [], [], [[], [], []], "", None, None, [], [],[],[],gr.update(value="Preview"),None
|
| 525 |
else:
|
| 526 |
if language=="English":
|
| 527 |
if narritive=="Narrator" :
|
|
|
|
| 569 |
]
|
| 570 |
|
| 571 |
|
| 572 |
+
return image_input, state, state, click_state, paragraph, origin_image,task_instruct,gallery_output,style_gallery_result,reco_reasons,reco_reasons,gr.update(value="Preview"),None
|
| 573 |
|
| 574 |
|
| 575 |
def print_like_dislike(x: gr.LikeData,state,log_state):
|
|
|
|
| 943 |
paragraph,artist,gender,image_path, log_state,history_log,output_audio])
|
| 944 |
|
| 945 |
example_image.change(
|
| 946 |
+
lambda:([],[],[],None,[],gr.update(value="Preview"),None),
|
| 947 |
[],
|
| 948 |
[gallery_result,style_gallery_result,recommend_bot,new_crop_save_path,chatbot,recommend_type,selected_image])
|
| 949 |
|