Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,9 @@ warnings.filterwarnings('ignore')
|
|
| 10 |
# For Hugging Face Spaces, place the CSV file in your repository (or update the path accordingly).
|
| 11 |
df = pd.read_csv('df_chatbot_response.csv')
|
| 12 |
|
|
|
|
|
|
|
|
|
|
| 13 |
# Create new conversation columns for variants A and B.
|
| 14 |
df['full_conversation_a'] = ''
|
| 15 |
df['full_conversation_b'] = ''
|
|
@@ -96,7 +99,7 @@ def update_conversation(choice, current_idx, choices_list):
|
|
| 96 |
|
| 97 |
# --- Gradio UI Setup ---
|
| 98 |
with gr.Blocks() as demo:
|
| 99 |
-
gr.Markdown("##
|
| 100 |
|
| 101 |
# States to track the current round and store user choices.
|
| 102 |
conversation_index = gr.State(0)
|
|
|
|
| 10 |
# For Hugging Face Spaces, place the CSV file in your repository (or update the path accordingly).
|
| 11 |
df = pd.read_csv('df_chatbot_response.csv')
|
| 12 |
|
| 13 |
+
df['len_history'] = df['history_conversation'].apply(lambda x: len(literal_eval(x)))
|
| 14 |
+
df = df[df['len_history']>1].reset_index(drop=True)
|
| 15 |
+
|
| 16 |
# Create new conversation columns for variants A and B.
|
| 17 |
df['full_conversation_a'] = ''
|
| 18 |
df['full_conversation_b'] = ''
|
|
|
|
| 99 |
|
| 100 |
# --- Gradio UI Setup ---
|
| 101 |
with gr.Blocks() as demo:
|
| 102 |
+
gr.Markdown(f"## Blind Test 2 Model LLM with Total Conversation {len(df)}")
|
| 103 |
|
| 104 |
# States to track the current round and store user choices.
|
| 105 |
conversation_index = gr.State(0)
|