Shubham89 commited on
Commit
54c6b3a
·
1 Parent(s): 0a0d7ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -9,12 +9,13 @@ os.environ["OPENAI_API_KEY"] = 'sk-TBQa3E1H2wInOLKRrQ3lT3BlbkFJIlyEKk8eGwDiVnM4V
9
  def gradio_ask_ai(user_input):
10
  index = GPTSimpleVectorIndex.load_from_disk('index.json')
11
  query = user_input
12
- f=open("yo.txt","a")
13
- f.write("file created")
14
- f.close()
15
  response = index.query(query)
16
  return response.response
17
-
18
- demo = gradio.Interface(fn=gradio_ask_ai, inputs = "text", outputs = "text", title = "Meshworks bot")
 
19
 
20
  demo.launch(inline=False)
 
9
  def gradio_ask_ai(user_input):
10
  index = GPTSimpleVectorIndex.load_from_disk('index.json')
11
  query = user_input
12
+ # f=open("yo.txt","a")
13
+ # f.write("file created")
14
+ # f.close()
15
  response = index.query(query)
16
  return response.response
17
+ a = gradio.File()
18
+ #demo = gradio.Interface(fn=gradio_ask_ai, inputs = "text", outputs = "text", title = "Meshworks bot")
19
+ demo = gradio.Interface(fn=gradio_ask_ai, inputs = "text", outputs = [a], title = "Meshworks bot")
20
 
21
  demo.launch(inline=False)