fastx commited on
Commit
96aecfe
·
1 Parent(s): 12ff56e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -29,7 +29,6 @@ def ask_ai(question,api_key):
29
 
30
  if openai_api_key == "":
31
  os.environ["OPENAI_API_KEY"] = "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"
32
- construct_index("data")
33
  else:
34
  os.environ["OPENAI_API_KEY"] = openai_api_key
35
  construct_index("data")
@@ -39,7 +38,7 @@ def ask_ai(question,api_key):
39
  return response.response
40
 
41
 
42
- api_key = gr.inputs.Textbox(label="OpenAI API Key")
43
  iface = gr.Interface(fn=ask_ai, inputs=["text", api_key], outputs="text", title="Chatbot")
44
 
45
 
 
29
 
30
  if openai_api_key == "":
31
  os.environ["OPENAI_API_KEY"] = "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"
 
32
  else:
33
  os.environ["OPENAI_API_KEY"] = openai_api_key
34
  construct_index("data")
 
38
  return response.response
39
 
40
 
41
+ api_key = gr.inputs.Textbox(label="OpenAI API Key (Or left blank to use default)"
42
  iface = gr.Interface(fn=ask_ai, inputs=["text", api_key], outputs="text", title="Chatbot")
43
 
44