Spaces:
Running
Running
breezedeus
commited on
Commit
β’
2122d2f
1
Parent(s):
16506da
optimize interface
Browse files- app.py +28 -10
- examples/coin-clip-logo.jpg +0 -0
app.py
CHANGED
@@ -164,13 +164,29 @@ def search(image_file: Image.Image):
|
|
164 |
|
165 |
def main():
|
166 |
title = 'USA Coin Retrieval by'
|
167 |
-
desc = (
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
examples = [
|
175 |
'examples/c2.jpeg',
|
176 |
'examples/c20.jpg',
|
@@ -190,9 +206,11 @@ def main():
|
|
190 |
gr.Markdown(
|
191 |
f'<h1 style="text-align: center; margin-bottom: 1rem;">{title} <a href="https://github.com/breezedeus/coin-clip" target="_blank">Coin-CLIP</a></h1>'
|
192 |
)
|
193 |
-
gr.Markdown(desc)
|
194 |
with gr.Row(equal_height=False):
|
195 |
-
with gr.Column(variant='compact', scale=
|
|
|
|
|
|
|
196 |
gr.Markdown('### Image within a coin')
|
197 |
image_file = gr.Image(
|
198 |
label='Coin Image to Search',
|
@@ -201,7 +219,7 @@ def main():
|
|
201 |
height=400,
|
202 |
)
|
203 |
sub_btn = gr.Button("Submit", variant="primary")
|
204 |
-
with gr.Column(variant='compact', scale=
|
205 |
gr.Markdown('### Detected Coin')
|
206 |
detected_image = gr.Image(
|
207 |
label='Detected Coin',
|
|
|
164 |
|
165 |
def main():
|
166 |
title = 'USA Coin Retrieval by'
|
167 |
+
# desc = (
|
168 |
+
# '<p style="text-align: center">Coin-CLIP: '
|
169 |
+
# '<a href="https://huggingface.co/breezedeus/coin-clip-vit-base-patch32" target="_blank">Model</a>, '
|
170 |
+
# '<a href="https://github.com/breezedeus/coin-clip" target="_blank">Github</a>; '
|
171 |
+
# 'Author: <a href="https://www.breezedeus.com" target="_blank">Breezedeus</a> , '
|
172 |
+
# '<a href="https://github.com/breezedeus" target="_blank">Github</a> </p>'
|
173 |
+
# )
|
174 |
+
desc = """
|
175 |
+
### Better Coin Retriever
|
176 |
+
|
177 |
+
| | |
|
178 |
+
| ------------------------------- | --------------------------------------- |
|
179 |
+
| πͺ **Model** | [Coin-CLIP](https://huggingface.co/breezedeus/coin-clip-vit-base-patch32) |
|
180 |
+
| πΌ **Code** | [Github](https://github.com/breezedeus/coin-clip) |
|
181 |
+
| π¨π»βπ» **Author** | [Breezedeus](https://www.breezedeus.com) |
|
182 |
+
| π¬ **Questions** | [GitHub Discussions](https://github.com/breezedeus/coin-clip/issues) |
|
183 |
+
|
184 |
+
<br/>
|
185 |
+
|
186 |
+
Leave a star π on the Github [Coin-CLIP πͺ](https://github.com/breezedeus/coin-clip) .
|
187 |
+
|
188 |
+
If you're interested in retrieving coins from other countries, please leave a comment on the Github.
|
189 |
+
"""
|
190 |
examples = [
|
191 |
'examples/c2.jpeg',
|
192 |
'examples/c20.jpg',
|
|
|
206 |
gr.Markdown(
|
207 |
f'<h1 style="text-align: center; margin-bottom: 1rem;">{title} <a href="https://github.com/breezedeus/coin-clip" target="_blank">Coin-CLIP</a></h1>'
|
208 |
)
|
|
|
209 |
with gr.Row(equal_height=False):
|
210 |
+
with gr.Column(variant='compact', scale=3):
|
211 |
+
# gr.HTML('<img src="examples/coin-clip-logo.jpg" width="150px"/>')
|
212 |
+
gr.Markdown(desc)
|
213 |
+
with gr.Column(variant='compact', scale=7):
|
214 |
gr.Markdown('### Image within a coin')
|
215 |
image_file = gr.Image(
|
216 |
label='Coin Image to Search',
|
|
|
219 |
height=400,
|
220 |
)
|
221 |
sub_btn = gr.Button("Submit", variant="primary")
|
222 |
+
with gr.Column(variant='compact', scale=4):
|
223 |
gr.Markdown('### Detected Coin')
|
224 |
detected_image = gr.Image(
|
225 |
label='Detected Coin',
|
examples/coin-clip-logo.jpg
ADDED