Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -306,34 +306,27 @@ sampling_params = {
|
|
| 306 |
# Initialize LLM
|
| 307 |
llm = LLM(max_model_len=8096)
|
| 308 |
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
placeholder="Type your message here...",
|
| 318 |
-
)
|
| 319 |
-
|
| 320 |
-
user_input.submit(
|
| 321 |
-
fn=user_conversation,
|
| 322 |
-
inputs=[user_input, chatbot, chat_state],
|
| 323 |
-
outputs=[user_input, chatbot, chat_state],
|
| 324 |
-
queue=False
|
| 325 |
-
)
|
| 326 |
-
|
| 327 |
-
send_button = gr.Button("Send")
|
| 328 |
-
send_button.click(
|
| 329 |
-
fn=user_conversation,
|
| 330 |
-
inputs=[user_input, chatbot, chat_state],
|
| 331 |
-
outputs=[user_input, chatbot, chat_state],
|
| 332 |
-
queue=False
|
| 333 |
-
)
|
| 334 |
|
| 335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
|
| 337 |
-
|
| 338 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 339 |
demo.launch()
|
|
|
|
| 306 |
# Initialize LLM
|
| 307 |
llm = LLM(max_model_len=8096)
|
| 308 |
|
| 309 |
+
with gr.Blocks() as demo:
|
| 310 |
+
gr.Markdown(f"<h2>{NAME_OF_SERVICE}</h2>")
|
| 311 |
+
chat_state = gr.State([])
|
| 312 |
+
chatbot = gr.Chatbot(label="Chat with the arXiv Paper Search Assistant")
|
| 313 |
+
user_input = gr.Textbox(
|
| 314 |
+
lines=1,
|
| 315 |
+
placeholder="Type your message here...",
|
| 316 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
|
| 318 |
+
user_input.submit(
|
| 319 |
+
fn=user_conversation,
|
| 320 |
+
inputs=[user_input, chatbot, chat_state],
|
| 321 |
+
outputs=[user_input, chatbot, chat_state],
|
| 322 |
+
queue=False
|
| 323 |
+
)
|
| 324 |
|
| 325 |
+
send_button = gr.Button("Send")
|
| 326 |
+
send_button.click(
|
| 327 |
+
fn=user_conversation,
|
| 328 |
+
inputs=[user_input, chatbot, chat_state],
|
| 329 |
+
outputs=[user_input, chatbot, chat_state],
|
| 330 |
+
queue=False
|
| 331 |
+
)
|
| 332 |
demo.launch()
|