Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,15 +9,15 @@ import numpy as np
|
|
| 9 |
import gradio as gr
|
| 10 |
|
| 11 |
|
| 12 |
-
set_input = gr.
|
| 13 |
-
set_input2 = gr.
|
| 14 |
|
| 15 |
-
#set_output = gr.
|
| 16 |
-
set_output1 = gr.
|
| 17 |
|
| 18 |
-
set_output2 = gr.
|
| 19 |
-
set_output3 = gr.
|
| 20 |
-
set_output4 = gr.
|
| 21 |
|
| 22 |
def perf_measure(y_actual, y_hat):
|
| 23 |
TP = 0
|
|
@@ -300,10 +300,10 @@ interface = gr.Interface(fn=visualize_ROC,
|
|
| 300 |
[0.5,get_example()],
|
| 301 |
[0.7,get_example()],
|
| 302 |
],
|
| 303 |
-
title="
|
| 304 |
description= "Click examples below for a quick demo",
|
| 305 |
theme = 'huggingface',
|
| 306 |
-
layout = 'horizontal',
|
| 307 |
live=True
|
| 308 |
)
|
| 309 |
|
|
|
|
| 9 |
import gradio as gr
|
| 10 |
|
| 11 |
|
| 12 |
+
set_input = gr.Dataframe(type="numpy", row_count=10, col_count=3, headers=['Sample Index', 'Predicted Prob', 'Label (Y)'], datatype=["number", "number", "number"])
|
| 13 |
+
set_input2 = gr.Slider(0, 1, step = 0.1, value=0.4, label="Set Probability Threshold (Default = 0.5)")
|
| 14 |
|
| 15 |
+
#set_output = gr.Textbox(label ='test')
|
| 16 |
+
set_output1 = gr.Dataframe(type="pandas", label = 'Predicted Labels',max_rows=10)
|
| 17 |
|
| 18 |
+
set_output2 = gr.Image(label="Confusion Matrix")
|
| 19 |
+
set_output3 = gr.Image(label="ROC curve")
|
| 20 |
+
set_output4 = gr.Image(label="Threshold Tuning curve")
|
| 21 |
|
| 22 |
def perf_measure(y_actual, y_hat):
|
| 23 |
TP = 0
|
|
|
|
| 300 |
[0.5,get_example()],
|
| 301 |
[0.7,get_example()],
|
| 302 |
],
|
| 303 |
+
title="ML Demo for Receiver Operating Characteristic (ROC) curve",
|
| 304 |
description= "Click examples below for a quick demo",
|
| 305 |
theme = 'huggingface',
|
| 306 |
+
#layout = 'horizontal',
|
| 307 |
live=True
|
| 308 |
)
|
| 309 |
|