pedropauletti's picture
Update app.py
3a18cdc verified
raw
history blame contribute delete
897 Bytes
from template.examples import examplesChatbot
from modules.respond import respond
import gradio as gr
import os
chatbot = gr.Chatbot(
placeholder="<strong>Sou o Chatbot de Legislação da Unesp</strong><br>Fique à vontade para fazer perguntas",
bubble_full_width=False,
avatar_images=(None, "imgs/chatbot-avatar.png"),
)
text = gr.Textbox(placeholder="Faça uma pergunta sobre a Legislação da Unesp", submit_btn=True)
dropbox = gr.Dropdown(["gpt-35-turbo", "gpt-4", "Phi-3-5-mini-instruct"], value="gpt-35-turbo", label='Modelo')
with gr.Blocks() as demo:
chat = gr.ChatInterface(
respond,
textbox=text,
additional_inputs=[
dropbox,
],
additional_inputs_accordion = 'Configurações',
chatbot=chatbot,
)
examples_list = gr.Examples(examples=examplesChatbot, inputs=text)
if __name__ == "__main__":
demo.launch(debug=True)