Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ def update_ratings(bot_index):
|
|
78 |
iface = gr.Interface(
|
79 |
fn=chat_with_bots,
|
80 |
inputs=[
|
81 |
-
gr.
|
82 |
],
|
83 |
outputs=[
|
84 |
gr.outputs.Textbox(label="Bot 1 Response"),
|
@@ -87,7 +87,7 @@ iface = gr.Interface(
|
|
87 |
live=True
|
88 |
)
|
89 |
|
90 |
-
iface.add_component(gr.
|
91 |
iface.add_component(gr.outputs.Textbox(label="Voting Result"), "vote_result")
|
92 |
|
93 |
iface.update(value=update_ratings, component_name="vote", outputs=["vote_result"])
|
|
|
78 |
iface = gr.Interface(
|
79 |
fn=chat_with_bots,
|
80 |
inputs=[
|
81 |
+
gr.components.Textbox(label="Your message")
|
82 |
],
|
83 |
outputs=[
|
84 |
gr.outputs.Textbox(label="Bot 1 Response"),
|
|
|
87 |
live=True
|
88 |
)
|
89 |
|
90 |
+
iface.add_component(gr.components.Radio(["Bot 1", "Bot 2"], label="Vote for the Best Response"), "vote")
|
91 |
iface.add_component(gr.outputs.Textbox(label="Voting Result"), "vote_result")
|
92 |
|
93 |
iface.update(value=update_ratings, component_name="vote", outputs=["vote_result"])
|