Spaces:
Runtime error
Runtime error
Update app.py
Browse filestesting additional inputs
app.py
CHANGED
|
@@ -101,20 +101,15 @@ def handle_prompt(message, history):
|
|
| 101 |
raise gr.Error("Requests rate limit exceeded")
|
| 102 |
"""
|
| 103 |
|
| 104 |
-
def handle_prompt(message, history):
|
| 105 |
-
return f"arxiv code: {message}"
|
| 106 |
|
| 107 |
|
| 108 |
greetingsmessage = "Hi, I'm your personal arXiv reader. Input the arXiv number of the paper:"
|
| 109 |
|
| 110 |
-
demo = gr.ChatInterface(handle_prompt, type="messages", theme=gr.themes.Soft(),
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
-
demo.launch()
|
| 113 |
-
|
| 114 |
-
example_questions = [
|
| 115 |
-
"Tell me more about SimBIG",
|
| 116 |
-
"How can you constrain neutrino mass with galaxies?",
|
| 117 |
-
"What is the DESI BGS?",
|
| 118 |
-
"What is SEDflow?",
|
| 119 |
-
"What are normalizing flows?"
|
| 120 |
-
]
|
|
|
|
| 101 |
raise gr.Error("Requests rate limit exceeded")
|
| 102 |
"""
|
| 103 |
|
| 104 |
+
def handle_prompt(message, history, input1):
|
| 105 |
+
return f"arxiv code: {input1}, {message}"
|
| 106 |
|
| 107 |
|
| 108 |
greetingsmessage = "Hi, I'm your personal arXiv reader. Input the arXiv number of the paper:"
|
| 109 |
|
| 110 |
+
demo = gr.ChatInterface(handle_prompt, type="messages", theme=gr.themes.Soft(),
|
| 111 |
+
description=greetingsmessage,
|
| 112 |
+
additional_inputs=[gr.Textbox("", label="arxiv.code")]
|
| 113 |
+
)
|
| 114 |
|
| 115 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|