Spaces:
Runtime error
Runtime error
print the metrics
Browse files
app.py
CHANGED
@@ -97,6 +97,7 @@ def find_orgs(uploaded_file):
|
|
97 |
all_metrics = {}
|
98 |
all_metrics['trf'] = get_metrics_trf(uploaded_data)
|
99 |
|
|
|
100 |
|
101 |
sample_data = store_sample_data(uploaded_data)
|
102 |
# with open('./data/sample_data.json', 'r') as f:
|
@@ -112,7 +113,7 @@ def find_orgs(uploaded_file):
|
|
112 |
# sim_model = SimCSE('sentence-transformers/all-MiniLM-L6-v2')
|
113 |
sim_model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
|
114 |
all_metrics['gpt'] = calc_metrics(true_orgs, gpt_orgs, sim_model, threshold=0.85)
|
115 |
-
|
116 |
return all_metrics
|
117 |
# radio_btn = gr.Radio(choices=['GPT', 'iSemantics'], value='iSemantics', label='Available models', show_label=True)
|
118 |
# textbox = gr.Textbox(label="Enter your text", placeholder=str(all_metrics), lines=8)
|
|
|
97 |
all_metrics = {}
|
98 |
all_metrics['trf'] = get_metrics_trf(uploaded_data)
|
99 |
|
100 |
+
print(all_metrics)
|
101 |
|
102 |
sample_data = store_sample_data(uploaded_data)
|
103 |
# with open('./data/sample_data.json', 'r') as f:
|
|
|
113 |
# sim_model = SimCSE('sentence-transformers/all-MiniLM-L6-v2')
|
114 |
sim_model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
|
115 |
all_metrics['gpt'] = calc_metrics(true_orgs, gpt_orgs, sim_model, threshold=0.85)
|
116 |
+
print(all_metrics)
|
117 |
return all_metrics
|
118 |
# radio_btn = gr.Radio(choices=['GPT', 'iSemantics'], value='iSemantics', label='Available models', show_label=True)
|
119 |
# textbox = gr.Textbox(label="Enter your text", placeholder=str(all_metrics), lines=8)
|