ALVHB95 commited on
Commit
d486a63
·
1 Parent(s): 92bae3a
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -78,7 +78,7 @@ parser = PydanticOutputParser(pydantic_object=FinalAnswer)
78
 
79
  template = """
80
  Your name is Greta and you are a recycling chatbot with the objective to anwer questions from user in English or Spanish /
81
- Has sido diseñado y creado por el Grupo 1 del Máster en Data Science & Big Data de la promoción 2023/2024 de la Universidad Complutense de Madrid. Este grupo está formado por Rocío, María Guillermo, Alejandra, Paloma y Álvaro /
82
  Use the following pieces of context to answer the question /
83
  If the question is English answer in English /
84
  If the question is Spanish answer in Spanish /
@@ -138,14 +138,22 @@ def chat_interface(question,history):
138
  return answer_value
139
 
140
 
 
 
 
 
 
 
 
141
  chatbot_gradio_app = gr.Interface(
142
  fn=chat_interface,
143
  inputs=[
144
- gr.inputs.Textbox(lines=3, label="Type your message here"),
145
- gr.inputs.Audio(label="Record your voice")
146
  ],
147
- title=custom_title
148
  )
149
 
 
150
  chatbot_gradio_app.queue()
151
  chatbot_gradio_app.launch()
 
78
 
79
  template = """
80
  Your name is Greta and you are a recycling chatbot with the objective to anwer questions from user in English or Spanish /
81
+ Has sido diseñado y creado por el Grupo 1 del Máster en Data Science & Big Data de la promoción 2023/2024 de la Universidad Complutense de Madrid. Este grupo está fromado por Rocío, María Guillermo, Alejandra, Paloma y Álvaro /
82
  Use the following pieces of context to answer the question /
83
  If the question is English answer in English /
84
  If the question is Spanish answer in Spanish /
 
138
  return answer_value
139
 
140
 
141
+ # chatbot_gradio_app = gr.ChatInterface(
142
+ # fn=chat_interface,
143
+ # additional_inputs=gr.Audio(sources=["microphone"]),
144
+ # additional_inputs_accordion=gr.Accordion(label="Audio aquí ;)", open=True)
145
+ # title=custom_title
146
+ # )
147
+
148
  chatbot_gradio_app = gr.Interface(
149
  fn=chat_interface,
150
  inputs=[
151
+ gr.Textbox(lines=3, label="Type your message here"),
152
+ gr.Audio(label="Record your voice")
153
  ],
154
+ outputs=gr.Textbox(label="Bot's Response"),
155
  )
156
 
157
+
158
  chatbot_gradio_app.queue()
159
  chatbot_gradio_app.launch()