Muhammad Abdiel Al Hafiz commited on
Commit
2825722
·
1 Parent(s): 73511e2

add css for markdown

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -55,13 +55,24 @@ example_images = [
55
  ["exp_eye_images/image_1002_g.jpg"]
56
  ]
57
 
 
 
 
 
 
 
 
 
 
 
 
58
  # Gradio Interface
59
  interface = gr.Interface(
60
  fn=predict_image,
61
  inputs=gr.Image(type="pil"),
62
  outputs=[
63
  gr.Label(num_top_classes=1, label="Prediction"),
64
- gr.Markdown(label="Explanation")
65
  ],
66
  examples=example_images,
67
  title="Eye Diseases Classifier",
 
55
  ["exp_eye_images/image_1002_g.jpg"]
56
  ]
57
 
58
+ # Custom CSS for Markdown height
59
+ css = """
60
+ .scrollable-markdown {
61
+ height: 250px;
62
+ overflow-y: scroll;
63
+ border: 1px solid #ccc;
64
+ padding: 10px;
65
+ box-sizing: border-box;
66
+ }
67
+ """
68
+
69
  # Gradio Interface
70
  interface = gr.Interface(
71
  fn=predict_image,
72
  inputs=gr.Image(type="pil"),
73
  outputs=[
74
  gr.Label(num_top_classes=1, label="Prediction"),
75
+ gr.Markdown(label="Explanation", elem_classes=["scrollable-markdown"])
76
  ],
77
  examples=example_images,
78
  title="Eye Diseases Classifier",