Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -76,8 +76,7 @@ def clear_chat(state):
|
|
76 |
state['last_bots'] = selected_adapters
|
77 |
|
78 |
# Reset other components specific to the "Chatbot Arena" tab
|
79 |
-
return state, [], [], gr.Button.update(interactive=
|
80 |
-
|
81 |
from datasets import load_dataset,DatasetDict,Dataset
|
82 |
import requests
|
83 |
import os
|
@@ -177,7 +176,7 @@ def vote_up_model(state, chatbot, chatbot2, character_name, character_descriptio
|
|
177 |
update_message = update_ratings(state, 0, collection, top_category)
|
178 |
chatbot.append(update_message[0])
|
179 |
chatbot2.append(update_message[1])
|
180 |
-
return chatbot, chatbot2, gr.Button.update(interactive=
|
181 |
|
182 |
def vote_down_model(state, chatbot, chatbot2, character_name, character_description, user_name):
|
183 |
user_input = format_prompt(state, 1, character_name, character_description, user_name)
|
@@ -187,7 +186,7 @@ def vote_down_model(state, chatbot, chatbot2, character_name, character_descript
|
|
187 |
update_message = update_ratings(state, 1, collection, top_category)
|
188 |
chatbot2.append(update_message[0])
|
189 |
chatbot.append(update_message[1])
|
190 |
-
return chatbot, chatbot2, gr.Button.update(interactive=
|
191 |
|
192 |
async def user_ask(state, chatbot1, chatbot2, textbox, character_name, character_description, user_name):
|
193 |
if character_name and len(character_name) > 20:
|
|
|
76 |
state['last_bots'] = selected_adapters
|
77 |
|
78 |
# Reset other components specific to the "Chatbot Arena" tab
|
79 |
+
return state, [], [], gr.Button.update(interactive=True, value="π Upvote A"), gr.Button.update(interactive=True, value="π Upvote B"), gr.Textbox.update(value='', interactive=True), gr.Button.update(interactive=True)
|
|
|
80 |
from datasets import load_dataset,DatasetDict,Dataset
|
81 |
import requests
|
82 |
import os
|
|
|
176 |
update_message = update_ratings(state, 0, collection, top_category)
|
177 |
chatbot.append(update_message[0])
|
178 |
chatbot2.append(update_message[1])
|
179 |
+
return chatbot, chatbot2, gr.Button.update(interactive=False, value="π Upvoted"), gr.Button.update(interactive=False), gr.Textbox.update(interactive=False), gr.Button.update(interactive=False)
|
180 |
|
181 |
def vote_down_model(state, chatbot, chatbot2, character_name, character_description, user_name):
|
182 |
user_input = format_prompt(state, 1, character_name, character_description, user_name)
|
|
|
186 |
update_message = update_ratings(state, 1, collection, top_category)
|
187 |
chatbot2.append(update_message[0])
|
188 |
chatbot.append(update_message[1])
|
189 |
+
return chatbot, chatbot2, gr.Button.update(interactive=False), gr.Button.update(interactive=False, value="π Upvoted"), gr.Textbox.update(interactive=False), gr.Button.update(interactive=False)
|
190 |
|
191 |
async def user_ask(state, chatbot1, chatbot2, textbox, character_name, character_description, user_name):
|
192 |
if character_name and len(character_name) > 20:
|