Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,10 +33,17 @@ def custom_chat(user_input):
|
|
| 33 |
messages.append({"role": "assistant", "content": chat_reply})
|
| 34 |
return chat_reply
|
| 35 |
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
demo = gr.Interface(fn=custom_chat,
|
| 38 |
-
inputs="text",
|
| 39 |
-
outputs="text",
|
| 40 |
-
title="Bring out your PDFs")
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
messages.append({"role": "assistant", "content": chat_reply})
|
| 34 |
return chat_reply
|
| 35 |
|
| 36 |
+
def dothis(file):
|
| 37 |
+
return file.name
|
| 38 |
|
| 39 |
+
#demo = gr.Interface(fn=custom_chat,
|
| 40 |
+
# inputs="text",
|
| 41 |
+
# outputs="text",
|
| 42 |
+
# title="Bring out your PDFs")
|
| 43 |
|
| 44 |
+
with gr.Blocks() as demo:
|
| 45 |
+
infile = gr.File()
|
| 46 |
+
text = gr.Textarea()
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
demo.launch(dothis, infile, text )
|