m-a-mohsen commited on
Commit
e426d25
·
1 Parent(s): 9da93f4

match streamlit

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -67,7 +67,7 @@ def classify_image(image):
67
  result_html = f"""
68
  <h2>Classification Result</h2>
69
  <p><strong>Predicted Class:</strong> {predicted_label}</p>
70
- <p><strong>Date and Time:</strong> {probabilities}</p>
71
  """
72
 
73
  # Return the result formatted in HTML
@@ -79,9 +79,10 @@ iface = gr.Interface(
79
  fn=classify_image,
80
  inputs=gr.Image(type="numpy", label="Upload an image"),
81
  outputs=gr.HTML(), # Output formatted with HTML
82
- title="Intracranial Hemorrhage Classifier",
83
- description="""<h1>Intracranial Hemorrhage Classifier</h1>
84
- <p>This Gradio application allows classifying images related to intracranial hemorrhage using a Vision Transformer (ViT) model.</p>
 
85
 
86
  <h2>Usage Instructions</h2>
87
 
@@ -89,10 +90,11 @@ iface = gr.Interface(
89
  <li>Click the "Choose File" button to upload an image related to intracranial hemorrhage.</li>
90
  <li>Wait a few seconds while the model processes the image.</li>
91
  <li>The result will show the predicted class related to intracranial hemorrhage.</li>
92
- <li>The date and time of the classification will also be displayed.</li>
93
  </ol>
94
 
95
  <p>This model can identify classes of intracranial hemorrhage, such as "epidural", "intraparenchymal", "intraventricular", "normal", "subarachnoid", and "subdural".</p>
 
96
 
97
  <p>Please note that this is a demonstration model and the results may not be accurate for clinical purposes.</p>""",
98
  )
 
67
  result_html = f"""
68
  <h2>Classification Result</h2>
69
  <p><strong>Predicted Class:</strong> {predicted_label}</p>
70
+ <p><strong>Probabilities(needs some work):</strong> {probabilities}</p>
71
  """
72
 
73
  # Return the result formatted in HTML
 
79
  fn=classify_image,
80
  inputs=gr.Image(type="numpy", label="Upload an image"),
81
  outputs=gr.HTML(), # Output formatted with HTML
82
+ title="",
83
+ description="""<h1>🧠 Intracranial Hemorrhage Detector</h1>
84
+ <p>Made with ❤️ by: Ines, Julia, Mo and Sep</p>
85
+
86
 
87
  <h2>Usage Instructions</h2>
88
 
 
90
  <li>Click the "Choose File" button to upload an image related to intracranial hemorrhage.</li>
91
  <li>Wait a few seconds while the model processes the image.</li>
92
  <li>The result will show the predicted class related to intracranial hemorrhage.</li>
93
+ <li>The Probability of the classification will also be displayed.</li>
94
  </ol>
95
 
96
  <p>This model can identify classes of intracranial hemorrhage, such as "epidural", "intraparenchymal", "intraventricular", "normal", "subarachnoid", and "subdural".</p>
97
+ <p>This Gradio application allows classifying images related to intracranial hemorrhage using a Vision Transformer (ViT) model.</p>
98
 
99
  <p>Please note that this is a demonstration model and the results may not be accurate for clinical purposes.</p>""",
100
  )