Spaces:
Runtime error
Runtime error
brunorosilva
commited on
Commit
•
4bbf116
1
Parent(s):
a3f9328
feat: add gradio meta and app.py
Browse files- README.md +11 -0
- app.py +10 -0
- requirements.txt +11 -0
README.md
CHANGED
@@ -1,3 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Image-to-Art Search
|
2 |
|
3 |
This project fine-tunes a Vision Transformer (ViT) model, pre-trained with "google/vit-base-patch32-224-in21k" weights and fine tuned with the style of [ArtButMakeItSports](https://www.instagram.com/artbutmakeitsports/), to perform image-to-art search across 81k artworks made available by [WikiArt](https://wikiart.org/).
|
|
|
1 |
+
---
|
2 |
+
title: Img2Art Search
|
3 |
+
emoji: 🦀
|
4 |
+
colorFrom: purple
|
5 |
+
colorTo: purple
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: 3.1.7
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
license: apache-2.0
|
11 |
+
---
|
12 |
# Image-to-Art Search
|
13 |
|
14 |
This project fine-tunes a Vision Transformer (ViT) model, pre-trained with "google/vit-base-patch32-224-in21k" weights and fine tuned with the style of [ArtButMakeItSports](https://www.instagram.com/artbutmakeitsports/), to perform image-to-art search across 81k artworks made available by [WikiArt](https://wikiart.org/).
|
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from img2art_search.models.predict import predict
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
interface = gr.Interface(
|
5 |
+
fn=predict,
|
6 |
+
inputs=gr.Image(type="pil"),
|
7 |
+
outputs=gr.Gallery(label="Most similar images", height=256 * 3),
|
8 |
+
live=True,
|
9 |
+
)
|
10 |
+
interface.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
torch
|
2 |
+
torchvision
|
3 |
+
tqdm
|
4 |
+
pandas
|
5 |
+
scipy
|
6 |
+
numpy
|
7 |
+
transformers
|
8 |
+
tensorboard
|
9 |
+
scikit-learn
|
10 |
+
matplotlib
|
11 |
+
gradio
|