Niki Zhang commited on
Commit
d1431c6
·
verified ·
1 Parent(s): 9ef960d

Update app.py

Browse files

update:
- global log
- chat history for gpt
- session switch

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1535,7 +1535,7 @@ async def texttospeech(text, language,gender='female'):
1535
  return None
1536
 
1537
  # give the reason of recommendation
1538
- async def associate(focus_info,openai_api_key,language,autoplay,length,log_state,sort_score,evt: gr.SelectData,narritive=None):
1539
  rec_path=evt._data['value']['image']['path']
1540
  index=evt.index
1541
  print("rec_path",rec_path)
@@ -2096,7 +2096,7 @@ def create_ui():
2096
 
2097
  gallery_result.select(
2098
  associate,
2099
- inputs=[paragraph,openai_api_key,language,auto_play,length,log_state,sort_rec],
2100
  outputs=[recommend_bot,output_audio,log_state,pic_index],
2101
 
2102
 
 
1535
  return None
1536
 
1537
  # give the reason of recommendation
1538
+ async def associate(focus_info,openai_api_key,language,autoplay,length,log_state,sort_score,narritive,evt: gr.SelectData):
1539
  rec_path=evt._data['value']['image']['path']
1540
  index=evt.index
1541
  print("rec_path",rec_path)
 
2096
 
2097
  gallery_result.select(
2098
  associate,
2099
+ inputs=[paragraph,openai_api_key,language,auto_play,length,log_state,sort_rec,naritive],
2100
  outputs=[recommend_bot,output_audio,log_state,pic_index],
2101
 
2102