Spaces:
Sleeping
Sleeping
added title and description
Browse files
app.py
CHANGED
@@ -128,9 +128,16 @@ def predict(img):
|
|
128 |
results = {labels[label] : float(predictions[label]) for label in toplabels}
|
129 |
return results
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
gr.Interface(fn=predict,
|
132 |
inputs=gr.Image(type="pil"),
|
133 |
outputs="label",
|
134 |
examples=['./miso soup.jpg','./cupcake.jpg','./pasta.jpg'],
|
135 |
-
|
136 |
-
|
|
|
|
128 |
results = {labels[label] : float(predictions[label]) for label in toplabels}
|
129 |
return results
|
130 |
|
131 |
+
description = """
|
132 |
+
This is a space for Image Classfication using a Swin Transformer finetuned on the Food101 dataset with Timm and 🤗.
|
133 |
+
You can find the model [here](https://huggingface.co/OmAlve/swin_s3_base_224-Foods-101)
|
134 |
+
And the Notebook for finetuning [here](https://github.com/Om-Alve/Finetuning-CV-model/blob/main/Swin-Foods-101.ipynb)
|
135 |
+
|
136 |
+
"""
|
137 |
gr.Interface(fn=predict,
|
138 |
inputs=gr.Image(type="pil"),
|
139 |
outputs="label",
|
140 |
examples=['./miso soup.jpg','./cupcake.jpg','./pasta.jpg'],
|
141 |
+
title="Food Classification with Swin Transformers",
|
142 |
+
description=description,
|
143 |
+
live=True).launch()
|