chahah commited on
Commit
1b0478e
·
verified ·
1 Parent(s): af033c0

Update app.py

Browse files

testing additional inputs

Files changed (1) hide show
  1. app.py +7 -12
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(), description=greetingsmessage)
 
 
 
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()