Remove the plotting of the graph as it is blowing up
Browse files
app.py
CHANGED
@@ -24,7 +24,9 @@ We'll create multiple prompts and evaluate them against our ground truth data to
|
|
24 |
First, let's install our dependencies and make sure we've got our API Key loaded from Secrets (or locally, if you're running via Jupyter)
|
25 |
"""
|
26 |
|
|
|
27 |
#!pip install datasets
|
|
|
28 |
|
29 |
from openai import OpenAI
|
30 |
import os
|
@@ -284,12 +286,10 @@ print("Accuracy Comparison:")
|
|
284 |
print(results_df)
|
285 |
|
286 |
# Create a visualization of the results
|
287 |
-
results_df.plot(x='Version', y='Accuracy', kind='bar')
|
288 |
|
289 |
"""## Define Gradio functions and create the chat interaction space"""
|
290 |
|
291 |
-
#!pip install gradio
|
292 |
-
|
293 |
def test_prompt(prompt_template: dict, user_prompt): #test_data: pd.DataFrame) -> pd.DataFrame:
|
294 |
"""Evaluate a prompt against test data and return metrics"""
|
295 |
messages = [
|
|
|
24 |
First, let's install our dependencies and make sure we've got our API Key loaded from Secrets (or locally, if you're running via Jupyter)
|
25 |
"""
|
26 |
|
27 |
+
# The pip install commands are not needed in Hugging Face, but may be needed in other environments.
|
28 |
#!pip install datasets
|
29 |
+
#!pip install gradio
|
30 |
|
31 |
from openai import OpenAI
|
32 |
import os
|
|
|
286 |
print(results_df)
|
287 |
|
288 |
# Create a visualization of the results
|
289 |
+
# results_df.plot(x='Version', y='Accuracy', kind='bar')
|
290 |
|
291 |
"""## Define Gradio functions and create the chat interaction space"""
|
292 |
|
|
|
|
|
293 |
def test_prompt(prompt_template: dict, user_prompt): #test_data: pd.DataFrame) -> pd.DataFrame:
|
294 |
"""Evaluate a prompt against test data and return metrics"""
|
295 |
messages = [
|