ppicazo commited on
Commit
6ae3ba4
·
verified ·
1 Parent(s): 749fb72

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  from transformers import pipeline
 
3
 
4
  model_pipeline = pipeline(task="image-classification", model="bortle/moon-detector-v5.a")
5
 
@@ -19,7 +20,7 @@ def predict(image):
19
  # Define the Gradio Interface
20
  gr.Interface(
21
  fn=predict,
22
- inputs=gr.Image(shape=(1080, None), type="pil", label="Upload image"),
23
  outputs=gr.Label(num_top_classes=5),
24
  title="Moon Detector",
25
  allow_flagging="manual",
 
1
  import gradio as gr
2
  from transformers import pipeline
3
+ from PIL import Image
4
 
5
  model_pipeline = pipeline(task="image-classification", model="bortle/moon-detector-v5.a")
6
 
 
20
  # Define the Gradio Interface
21
  gr.Interface(
22
  fn=predict,
23
+ inputs=gr.Image(type="pil", label="Upload image"),
24
  outputs=gr.Label(num_top_classes=5),
25
  title="Moon Detector",
26
  allow_flagging="manual",