noah007 commited on
Commit
8e533ce
·
verified ·
1 Parent(s): bfff3f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -56,6 +56,7 @@ Context is: {input_context}
56
 
57
  def initiate_chat(config_list, problem, queue, n_results=3):
58
  global assistant, ragproxyagent
 
59
  if isinstance(config_list, gr.State):
60
  _config_list = config_list.value
61
  else:
@@ -195,7 +196,7 @@ with gr.Blocks() as demo:
195
  os.environ["AZURE_OPENAI_API_KEY"] = aoai_key
196
  os.environ["AZURE_OPENAI_API_BASE"] = aoai_base
197
  return model, oai_key, aoai_key, aoai_base
198
-
199
  txt_model = gr.Dropdown(
200
  label="Model",
201
  choices=[
@@ -273,6 +274,7 @@ Context is: {input_context}""",
273
 
274
  def respond(message, chat_history, model, oai_key, aoai_key, aoai_base):
275
  global config_list
 
276
  set_params(model, oai_key, aoai_key, aoai_base)
277
  config_list = update_config(config_list)
278
  messages = chatbot_reply(message)
@@ -292,7 +294,7 @@ Context is: {input_context}""",
292
 
293
  def update_context_url(context_url):
294
  global assistant, ragproxyagent
295
-
296
  file_extension = Path(context_url).suffix
297
  print("file_extension: ", file_extension)
298
  if file_extension.lower() not in [f".{i}" for i in TEXT_FORMATS]:
 
56
 
57
  def initiate_chat(config_list, problem, queue, n_results=3):
58
  global assistant, ragproxyagent
59
+ print("test loc 4")
60
  if isinstance(config_list, gr.State):
61
  _config_list = config_list.value
62
  else:
 
196
  os.environ["AZURE_OPENAI_API_KEY"] = aoai_key
197
  os.environ["AZURE_OPENAI_API_BASE"] = aoai_base
198
  return model, oai_key, aoai_key, aoai_base
199
+ print("test loc1")
200
  txt_model = gr.Dropdown(
201
  label="Model",
202
  choices=[
 
274
 
275
  def respond(message, chat_history, model, oai_key, aoai_key, aoai_base):
276
  global config_list
277
+ print("test loc2")
278
  set_params(model, oai_key, aoai_key, aoai_base)
279
  config_list = update_config(config_list)
280
  messages = chatbot_reply(message)
 
294
 
295
  def update_context_url(context_url):
296
  global assistant, ragproxyagent
297
+ print("test loc3")
298
  file_extension = Path(context_url).suffix
299
  print("file_extension: ", file_extension)
300
  if file_extension.lower() not in [f".{i}" for i in TEXT_FORMATS]: