ManjinderUNCC commited on
Commit
ff92eb4
·
verified ·
1 Parent(s): 31cece3

Update gradio_interface.py

Browse files
Files changed (1) hide show
  1. 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
- "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")
 
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")