Asseh commited on
Commit
538c137
1 Parent(s): 11a880d

Rename app.py to requirements.txt

Browse files
Files changed (2) hide show
  1. app.py +0 -22
  2. requirements.txt +4 -0
app.py DELETED
@@ -1,22 +0,0 @@
1
- !pip install transformers
2
-
3
- import gradio as gr
4
- from transformers import pipeline
5
-
6
-
7
- pipe = pipeline("image-classification", model="julien-c/hotdog-not-hotdog")
8
-
9
- def predict(input_img):
10
- predictions = pipeline(input_img)
11
- return input_img, {p["label"]: p["score"] for p in predictions}
12
-
13
- import gradio as gr
14
- gradio_app = gr.Interface(
15
- predict,
16
- inputs = gr.Image(label="select hot dot candiadate", sources=['upload', 'webcam'], type='pil'),
17
- outputs = [gr.Image(label="Processed Image"), gr.Label(label="Result", num_top_classes=2)],
18
- title="Hot Dog? or Not?"
19
- )
20
-
21
- if __name__ == "__main__":
22
- gradio_app.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+
3
+ transformers
4
+ torch