Spaces:
Sleeping
Sleeping
socd06
commited on
Commit
·
fbd964c
1
Parent(s):
bf8d034
add login
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import requests
|
2 |
-
from huggingface_hub import from_pretrained_fastai
|
3 |
|
4 |
import gradio as gr
|
5 |
|
@@ -19,6 +19,7 @@ def predict_fn(img):
|
|
19 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
20 |
|
21 |
|
|
|
22 |
gr.Interface(predict_fn,
|
23 |
gr.inputs.Image(type='pil', shape=(512, 512)),
|
24 |
outputs=gr.outputs.Label(num_top_classes=3)).launch()
|
|
|
1 |
import requests
|
2 |
+
from huggingface_hub import from_pretrained_fastai, login
|
3 |
|
4 |
import gradio as gr
|
5 |
|
|
|
19 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
20 |
|
21 |
|
22 |
+
login()
|
23 |
gr.Interface(predict_fn,
|
24 |
gr.inputs.Image(type='pil', shape=(512, 512)),
|
25 |
outputs=gr.outputs.Label(num_top_classes=3)).launch()
|