gufett0's picture
vectostoreindex
f0608de
raw
history blame contribute delete
972 Bytes
from backend import handle_query
import gradio as gr
DESCRIPTION = """\
# <div style="text-align: center;">Odi, l'assistente ricercatore degli Osservatori</div>
👉 Retrieval-Augmented Generation - Ask me anything about the research carried out at the Osservatori.
"""
chat_interface =gr.ChatInterface(
fn=handle_query,
chatbot=gr.Chatbot(height=500),
textbox=gr.Textbox(placeholder="Chiedimi qualasiasi cosa relativa agli Osservatori", container=False, scale=7),
#examples=[["Ciao, in cosa puoi aiutarmi?"],["Dimmi i risultati e le modalità di conduzione del censimento per favore"]]
)
with gr.Blocks(css=".gradio-container {background-color: #B9D9EB}") as demo:
gr.Markdown(DESCRIPTION)
#gr.DuplicateButton(value="Duplicate Space for private use", elem_id="duplicate-button")
chat_interface.render()
if __name__ == "__main__":
#progress = gr.Progress(track_tqdm=True)
demo.launch()