Update app.py
Browse files
app.py
CHANGED
|
@@ -19,11 +19,9 @@ def cerviccancer(Age, Num_sexual_partners, First_sexual_intercourse, Num_pregnan
|
|
| 19 |
|
| 20 |
# Categorize prediction_value
|
| 21 |
if prediction_value == 0:
|
| 22 |
-
result = "Biopsy Not Needed"
|
| 23 |
-
color = "green"
|
| 24 |
else:
|
| 25 |
-
result = "Biopsy Needed"
|
| 26 |
-
color = "red"
|
| 27 |
|
| 28 |
return f"Predicted probability of Biopsy: {prediction_value} \n\nResult: {result}"
|
| 29 |
|
|
@@ -64,12 +62,9 @@ cerviccancer_ga = gr.Interface(fn=cerviccancer,
|
|
| 64 |
gr.Number(0.0, 1.0, label="Schiller: [0 or 1]"),
|
| 65 |
gr.Number(0.0, 1.0, label="Citology: [0 or 1]")
|
| 66 |
],
|
| 67 |
-
outputs=
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
],
|
| 71 |
-
description="Predicting probability of Biopsy Using Machine Learning.\n\nDeveloped by: Parthebhan Pari \n\nDeveloped on: Apl 2024",
|
| 72 |
-
theme='dark'
|
| 73 |
)
|
| 74 |
|
| 75 |
cerviccancer_ga.launch(auth = ('parthebhan','cerviccancer'),share=True,debug=True)
|
|
|
|
| 19 |
|
| 20 |
# Categorize prediction_value
|
| 21 |
if prediction_value == 0:
|
| 22 |
+
result = "<font color='green'>Biopsy Not Needed</font>"
|
|
|
|
| 23 |
else:
|
| 24 |
+
result = "<font color='red'>Biopsy Needed</font>"
|
|
|
|
| 25 |
|
| 26 |
return f"Predicted probability of Biopsy: {prediction_value} \n\nResult: {result}"
|
| 27 |
|
|
|
|
| 62 |
gr.Number(0.0, 1.0, label="Schiller: [0 or 1]"),
|
| 63 |
gr.Number(0.0, 1.0, label="Citology: [0 or 1]")
|
| 64 |
],
|
| 65 |
+
outputs=gr.Textbox(default="Predicted probability of Biopsy", label="Prediction"),
|
| 66 |
+
description="Predicting probability of Biopsy Using Machine Learning.\n\nDeveloped by: Parthebhan Pari \n\nDeveloped on: Apl 2024",
|
| 67 |
+
theme='dark'
|
|
|
|
|
|
|
|
|
|
| 68 |
)
|
| 69 |
|
| 70 |
cerviccancer_ga.launch(auth = ('parthebhan','cerviccancer'),share=True,debug=True)
|