itbetyar commited on
Commit
32d639e
·
verified ·
1 Parent(s): 90a2042

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -25,12 +25,25 @@ def predict_fn(img):
25
  values, indices = torch.topk(probabilites, k=5)
26
 
27
  return {LABELS[i]: v.item() for i, v in zip(indices, values)}
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  gr.Interface(
30
  predict_fn,
31
  inputs=gr.components.Image(type='pil'),
32
  outputs='label',
33
  title="IT Betyár - ResNet50 Image Classifier",
34
- description="Upload an image to get top 5 class predictions.",
 
35
  ).launch()
36
-
 
25
  values, indices = torch.topk(probabilites, k=5)
26
 
27
  return {LABELS[i]: v.item() for i, v in zip(indices, values)}
28
+
29
+ # HTML for the header
30
+ header_html = """
31
+ <div style="text-align: center; max-width: 650px; margin: 0 auto;">
32
+ <h1 style="color: #2c3e50; font-size: 2.5em;">IT Betyár Resnet- Image Classifier</h1>
33
+ <img src="imgclass.webp" alt="Header Image" style="max-width: 100%; height: auto; margin: 20px 0;">
34
+ <p style="color: #34495e; font-size: 1.2em;">
35
+ Üdvözöljük képosztályozónkban! Ez az eszköz egy ImageNeten betanított ResNet50 modellt használja
36
+ a képek osztályozására. Tölts fel egy képet, és megmutatjuk az 5 legjobb előrejelzést.
37
+ </p>
38
+ </div>
39
+ """
40
 
41
  gr.Interface(
42
  predict_fn,
43
  inputs=gr.components.Image(type='pil'),
44
  outputs='label',
45
  title="IT Betyár - ResNet50 Image Classifier",
46
+ description="Tölts fel egy képet a predikcióhoz!",
47
+ article=header_html # Add the header HTML here
48
  ).launch()
49
+