runaksh commited on
Commit
22caeae
·
verified ·
1 Parent(s): 1833024

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -32,7 +32,7 @@ def classify_image(image):
32
  # Convert the index to the model's class label
33
  label_pneumonia = index_to_label_pneumonia.get(predicted_class_idx_pneumonia, "Unknown Label")
34
  label_tuberculosis = index_to_label_tuberculosis.get(predicted_class_idx_tuberculosis, "Unknown Label")
35
- label = label_pneumonia+" "+label_tuberculosis
36
 
37
  return label
38
 
@@ -45,7 +45,8 @@ iface = gr.Interface(fn=classify_image,
45
  inputs=gr.Image(), # Accepts image of any size
46
  outputs=gr.Label(),
47
  title=title,
48
- description=description)
 
49
 
50
  # Launch the app
51
  iface.launch()
 
32
  # Convert the index to the model's class label
33
  label_pneumonia = index_to_label_pneumonia.get(predicted_class_idx_pneumonia, "Unknown Label")
34
  label_tuberculosis = index_to_label_tuberculosis.get(predicted_class_idx_tuberculosis, "Unknown Label")
35
+ label = label_pneumonia+" "+label_tuberculosis
36
 
37
  return label
38
 
 
45
  inputs=gr.Image(), # Accepts image of any size
46
  outputs=gr.Label(),
47
  title=title,
48
+ description=description,
49
+ css=".gradio-container {background-image: url('https://www.bing.com/images/search?view=detailV2&ccid=ltop6MR8&id=5789472A3B2B302E20E92379352197CD6637BA84&thid=OIP.ltop6MR8st61NhZxYCXB2AHaFj&mediaurl=https%3A%2F%2Fcdn.siasat.com%2Fwp-content%2Fuploads%2F2020%2F07%2Flungs.jpg&exph=900&expw=1200&q=lungs+related+disease+images&simid=607993135989994625&form=IRPRST&ck=9668E8830C61992F33E96AEC24942295&selectedindex=17&itb=0&ajaxhist=0&ajaxserp=0&vt=0&sim=11');}") as demo:)
50
 
51
  # Launch the app
52
  iface.launch()