Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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"
|