Luis Carlos Quesada commited on
Commit
e1ff2f1
·
1 Parent(s): 58001fa

Fuck you Jiang Yang!

Browse files
Files changed (3) hide show
  1. .gitignore +1 -0
  2. app.py +17 -0
  3. requirements.txt +2 -0
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ venv/*
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+
5
+ pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
6
+
7
+
8
+ def predict(image):
9
+ predictions = pipeline(image)
10
+ return {p["label"]: p["score"] for p in predictions}
11
+
12
+ gr.Interface(
13
+ predict,
14
+ inputs=gr.Image(label="Upload hot dog candidate", type="filepath"),
15
+ outputs=gr.Label(num_top_classes=2),
16
+ title="Hot Dog? Or Not?",
17
+ ).launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ torch
2
+ transformers