Spaces:
Running
Running
Niki Zhang
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -1765,7 +1765,7 @@ async def style_associate(image_path,openai_api_key,language,autoplay,length,log
|
|
| 1765 |
|
| 1766 |
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"):
|
| 1767 |
if session_type=="Session 1":
|
| 1768 |
-
return None, [], [], [[], [], []], "", None, None, [], [],[],[]
|
| 1769 |
else:
|
| 1770 |
if language=="English":
|
| 1771 |
if narritive=="Third-person" :
|
|
@@ -1813,7 +1813,7 @@ def change_naritive(session_type,image_input, state, click_state, paragraph, ori
|
|
| 1813 |
]
|
| 1814 |
|
| 1815 |
|
| 1816 |
-
return image_input, state, state, click_state, paragraph, origin_image,task_instruct,gallery_output,style_gallery_result,reco_reasons,reco_reasons
|
| 1817 |
|
| 1818 |
|
| 1819 |
def print_like_dislike(x: gr.LikeData,state,log_state):
|
|
@@ -2659,9 +2659,9 @@ def create_ui():
|
|
| 2659 |
|
| 2660 |
example_image.change(clear_chat_memory, inputs=[visual_chatgpt])
|
| 2661 |
example_image.change(
|
| 2662 |
-
lambda:([],[],[],None,[]),
|
| 2663 |
[],
|
| 2664 |
-
[gallery_result,style_gallery_result,recommend_bot,new_crop_save_path,chatbot])
|
| 2665 |
|
| 2666 |
# def on_click_tab_selected():
|
| 2667 |
# if gpt_state ==1:
|
|
@@ -2807,7 +2807,7 @@ def create_ui():
|
|
| 2807 |
change_naritive,
|
| 2808 |
[session_type, image_input, state, click_state, paragraph, origin_image,naritive,
|
| 2809 |
task_instuction,gallery_result,style_gallery_result,recomended_state,language],
|
| 2810 |
-
[image_input, chatbot, state, click_state, paragraph, origin_image,task_instuction,gallery_result,style_gallery_result,recomended_state,recommend_bot],
|
| 2811 |
queue=False,
|
| 2812 |
show_progress=False
|
| 2813 |
|
|
|
|
| 1765 |
|
| 1766 |
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"):
|
| 1767 |
if session_type=="Session 1":
|
| 1768 |
+
return None, [], [], [[], [], []], "", None, None, [], [],[],[],gr.update(value="Preview")
|
| 1769 |
else:
|
| 1770 |
if language=="English":
|
| 1771 |
if narritive=="Third-person" :
|
|
|
|
| 1813 |
]
|
| 1814 |
|
| 1815 |
|
| 1816 |
+
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")
|
| 1817 |
|
| 1818 |
|
| 1819 |
def print_like_dislike(x: gr.LikeData,state,log_state):
|
|
|
|
| 2659 |
|
| 2660 |
example_image.change(clear_chat_memory, inputs=[visual_chatgpt])
|
| 2661 |
example_image.change(
|
| 2662 |
+
lambda:([],[],[],None,[],gr.update(value="Preview")),
|
| 2663 |
[],
|
| 2664 |
+
[gallery_result,style_gallery_result,recommend_bot,new_crop_save_path,chatbot,recommend_type])
|
| 2665 |
|
| 2666 |
# def on_click_tab_selected():
|
| 2667 |
# if gpt_state ==1:
|
|
|
|
| 2807 |
change_naritive,
|
| 2808 |
[session_type, image_input, state, click_state, paragraph, origin_image,naritive,
|
| 2809 |
task_instuction,gallery_result,style_gallery_result,recomended_state,language],
|
| 2810 |
+
[image_input, chatbot, state, click_state, paragraph, origin_image,task_instuction,gallery_result,style_gallery_result,recomended_state,recommend_bot,recommend_type],
|
| 2811 |
queue=False,
|
| 2812 |
show_progress=False
|
| 2813 |
|