atharva-nlp commited on
Commit
9f04a4a
·
verified ·
1 Parent(s): 68a7d4e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -56,12 +56,12 @@ query_engine = index.as_query_engine()
56
  # result = pipe(input_text)
57
  # return result[0]['generated_text']
58
 
59
- def rag(input_text):
60
  return query_engine.query(
61
  input_text
62
  )
63
 
64
- iface = gr.Interface(fn=rag, inputs=[gr.Textbox(label="Question", lines=6)],
65
  outputs=[gr.Textbox(label="Result", lines=6)],
66
  title="Answer my question",
67
  description= "CoolChatBot"
 
56
  # result = pipe(input_text)
57
  # return result[0]['generated_text']
58
 
59
+ def rag(input_text, file):
60
  return query_engine.query(
61
  input_text
62
  )
63
 
64
+ iface = gr.Interface(fn=rag, inputs=[gr.Textbox(label="Question", lines=6), gr.File()],
65
  outputs=[gr.Textbox(label="Result", lines=6)],
66
  title="Answer my question",
67
  description= "CoolChatBot"