Update app.py
Browse files
app.py
CHANGED
|
@@ -52,11 +52,11 @@ def launch(message):
|
|
| 52 |
#return out[ind:]
|
| 53 |
|
| 54 |
# This is to convert QA system to a chatbot
|
| 55 |
-
return chat.send_message(message) + "\
|
| 56 |
|
| 57 |
iface = gr.Interface(launch,
|
| 58 |
-
inputs="text",
|
| 59 |
-
outputs="text",
|
| 60 |
css=css,
|
| 61 |
title="Hey I am CosmoGemma 👋 I can answer cosmology questions from astroph.CO research articles. Try me :)",
|
| 62 |
description="Gemma_2b_en fine-tuned on QA pairs (~3.5k) generated from Cosmology and Nongalactic Astrophysics articles (arXiv astro-ph.CO) from 2018-2022 and tested on QA pairs (~1k) generated from 2023 articles, scoring over 75% accuracy.")
|
|
|
|
| 52 |
#return out[ind:]
|
| 53 |
|
| 54 |
# This is to convert QA system to a chatbot
|
| 55 |
+
return chat.send_message(message) + "\n\n##### History #####\n\n" + chat.get_history()
|
| 56 |
|
| 57 |
iface = gr.Interface(launch,
|
| 58 |
+
inputs=["text",gr.State()],
|
| 59 |
+
outputs=["text",gr.State()],
|
| 60 |
css=css,
|
| 61 |
title="Hey I am CosmoGemma 👋 I can answer cosmology questions from astroph.CO research articles. Try me :)",
|
| 62 |
description="Gemma_2b_en fine-tuned on QA pairs (~3.5k) generated from Cosmology and Nongalactic Astrophysics articles (arXiv astro-ph.CO) from 2018-2022 and tested on QA pairs (~1k) generated from 2023 articles, scoring over 75% accuracy.")
|