Niki Zhang commited on
Commit
1f7e0f0
·
verified ·
1 Parent(s): b96896b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1136,7 +1136,7 @@ def export_chat_log(chat_state, paragraph, liked, disliked):
1136
  async def get_artistinfo(artist_name,api_key,state,language,autoplay,length):
1137
  prompt=f"Provide a concise summary of about {length} words on the painter {artist_name}, covering his biography, major works, artistic style, significant contributions to the art world, and any major awards or recognitions he has received."
1138
  res=get_gpt_response(api_key,None,prompt)
1139
- state = state + [(None, f"Artist Info:{res}")]
1140
  read_info = re.sub(r'[#[\]!*]','',res)
1141
  read_info = emoji.replace_emoji(read_info,replace="")
1142
 
@@ -1152,7 +1152,7 @@ async def get_artistinfo(artist_name,api_key,state,language,autoplay,length):
1152
  async def get_yearinfo(year,api_key,state,language,autoplay,length):
1153
  prompt = f"Provide a concise summary of about {length} words on the art historical period associated with the year {year}, covering its major characteristics, influential artists, notable works, and its significance in the broader context of art history."
1154
  res=get_gpt_response(api_key,None,prompt)
1155
- state = state + [(None, f"Artist Info:{res}")]
1156
  read_info = re.sub(r'[#[\]!*]','',res)
1157
  read_info = emoji.replace_emoji(read_info,replace="")
1158
 
 
1136
  async def get_artistinfo(artist_name,api_key,state,language,autoplay,length):
1137
  prompt=f"Provide a concise summary of about {length} words on the painter {artist_name}, covering his biography, major works, artistic style, significant contributions to the art world, and any major awards or recognitions he has received."
1138
  res=get_gpt_response(api_key,None,prompt)
1139
+ state = state + [(None, f"Artist Background:{res}")]
1140
  read_info = re.sub(r'[#[\]!*]','',res)
1141
  read_info = emoji.replace_emoji(read_info,replace="")
1142
 
 
1152
  async def get_yearinfo(year,api_key,state,language,autoplay,length):
1153
  prompt = f"Provide a concise summary of about {length} words on the art historical period associated with the year {year}, covering its major characteristics, influential artists, notable works, and its significance in the broader context of art history."
1154
  res=get_gpt_response(api_key,None,prompt)
1155
+ state = state + [(None, f"History Background: {res}")]
1156
  read_info = re.sub(r'[#[\]!*]','',res)
1157
  read_info = emoji.replace_emoji(read_info,replace="")
1158