Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,10 +65,36 @@ def respond(message, history):
|
|
| 65 |
# 3. Interfaccia Chat
|
| 66 |
demo = gr.ChatInterface(
|
| 67 |
respond,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
title="🚀 Limba 1.0 - Progetto Margherita",
|
| 69 |
-
description="Liceo Scientifico 'E. Fermi' - Nuoro. Assistente creato da Francesco Palladino
|
| 70 |
-
examples=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
)
|
| 72 |
|
|
|
|
|
|
|
|
|
|
| 73 |
if __name__ == "__main__":
|
| 74 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 65 |
# 3. Interfaccia Chat
|
| 66 |
demo = gr.ChatInterface(
|
| 67 |
respond,
|
| 68 |
+
# 1. Configurazione del Chatbot (con supporto LaTeX per le formule)
|
| 69 |
+
chatbot=gr.Chatbot(
|
| 70 |
+
latex_delimiters=[
|
| 71 |
+
{"left": "$$", "right": "$$", "display": True},
|
| 72 |
+
{"left": "$", "right": "$", "display": False}
|
| 73 |
+
]
|
| 74 |
+
),
|
| 75 |
+
# 2. Riquadro di testo molto più visibile e accogliente
|
| 76 |
+
textbox=gr.Textbox(
|
| 77 |
+
placeholder="Scrivi qui la tua domanda per Limba...",
|
| 78 |
+
container=False,
|
| 79 |
+
scale=7,
|
| 80 |
+
lines=2 # Rende il box fisicamente più alto e facile da notare
|
| 81 |
+
),
|
| 82 |
+
# 3. Testi e Pulsanti personalizzati
|
| 83 |
title="🚀 Limba 1.0 - Progetto Margherita",
|
| 84 |
+
description="Liceo Scientifico 'E. Fermi' - Nuoro. Assistente creato da Francesco Palladino.",
|
| 85 |
+
examples=[
|
| 86 |
+
"Chie ti hat creadu?",
|
| 87 |
+
"Spiegami la seconda legge di Newton",
|
| 88 |
+
"Spiegami la fotosintesi clorofilliana"
|
| 89 |
+
],
|
| 90 |
+
submit_btn="Invia 🚀",
|
| 91 |
+
retry_btn="Riprova 🔄",
|
| 92 |
+
undo_btn="Annulla ↩️",
|
| 93 |
+
clear_btn="Pulisci 🗑️",
|
| 94 |
)
|
| 95 |
|
| 96 |
+
if __name__ == "__main__":
|
| 97 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 98 |
+
|
| 99 |
if __name__ == "__main__":
|
| 100 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|