Spaces:
Sleeping
Sleeping
ManjinderUNCC
commited on
Update gradio_interface.py
Browse files- gradio_interface.py +12 -12
gradio_interface.py
CHANGED
@@ -44,19 +44,19 @@ def evaluate_text(input_text):
|
|
44 |
# Additional classification report
|
45 |
report = classification_report(ground_truth_labels_list, [1 if prob > threshold else 0 for prob in predicted_labels_list])
|
46 |
|
47 |
-
# Construct output dictionary
|
48 |
-
output_dict = {
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
}
|
58 |
|
59 |
-
return output_dict
|
60 |
|
61 |
# Gradio Interface
|
62 |
iface = gr.Interface(fn=evaluate_text, inputs="text", outputs="json", title="Text Evaluation-Manjinder", description="Enter your text")
|
|
|
44 |
# Additional classification report
|
45 |
report = classification_report(ground_truth_labels_list, [1 if prob > threshold else 0 for prob in predicted_labels_list])
|
46 |
|
47 |
+
# # Construct output dictionary
|
48 |
+
# output_dict = {
|
49 |
+
# "PredictedLabels": predicted_labels,
|
50 |
+
# "EvaluationMetrics": {
|
51 |
+
# "Accuracy": accuracy,
|
52 |
+
# "Precision": precision,
|
53 |
+
# "Recall": recall,
|
54 |
+
# "F1-Score": f1,
|
55 |
+
# "ClassificationReport": report
|
56 |
+
# }
|
57 |
+
# }
|
58 |
|
59 |
+
# return output_dict
|
60 |
|
61 |
# Gradio Interface
|
62 |
iface = gr.Interface(fn=evaluate_text, inputs="text", outputs="json", title="Text Evaluation-Manjinder", description="Enter your text")
|