ankitkupadhyay commited on
Commit
0b14df6
·
verified ·
1 Parent(s): 5287106

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -59,20 +59,21 @@ def predict(image, text_input):
59
  _, prediction = torch.max(outputs, dim=1)
60
  return prediction.item() # 1 for Malignant, 0 for Benign
61
 
62
- # Enhanced UI with background image and color-coded prediction display
63
  with gr.Blocks(css="""
64
  body {
65
- background: url('https://huggingface.co/spaces/ankitkupadhyay/skin_cancer_detection/blob/main/melanoma.png') no-repeat center center fixed;
66
- background-size: cover;
67
  }
68
  .benign, .malignant {
69
  background-color: white;
70
  border: 1px solid lightgray;
71
  padding: 10px;
72
  border-radius: 5px;
 
73
  }
74
  .benign.correct, .malignant.correct {
75
  background-color: lightgreen;
 
76
  }
77
  """) as demo:
78
  gr.Markdown(
@@ -106,3 +107,4 @@ demo.launch()
106
 
107
 
108
 
 
 
59
  _, prediction = torch.max(outputs, dim=1)
60
  return prediction.item() # 1 for Malignant, 0 for Benign
61
 
62
+ # Enhanced UI with black text
63
  with gr.Blocks(css="""
64
  body {
65
+ color: black;
 
66
  }
67
  .benign, .malignant {
68
  background-color: white;
69
  border: 1px solid lightgray;
70
  padding: 10px;
71
  border-radius: 5px;
72
+ color: black;
73
  }
74
  .benign.correct, .malignant.correct {
75
  background-color: lightgreen;
76
+ color: black;
77
  }
78
  """) as demo:
79
  gr.Markdown(
 
107
 
108
 
109
 
110
+