julius119 commited on
Commit
5d9dcdc
·
verified ·
1 Parent(s): 4ef98e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -1
app.py CHANGED
@@ -24,4 +24,22 @@ with gr.Blocks(title="VerseFlow Studio v5.0 Demo") as demo:
24
 
25
  submit_btn.click(fn=generate_ai_video, inputs=[prompt_input, scene_dropdown, tier_dropdown], outputs=[status_output, author_notice])
26
 
27
- demo.queue().launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  submit_btn.click(fn=generate_ai_video, inputs=[prompt_input, scene_dropdown, tier_dropdown], outputs=[status_output, author_notice])
26
 
27
+ demo.queue().launch()
28
+ import gradio as gr
29
+ from transformers import pipeline
30
+
31
+ pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
32
+
33
+ def predict(input_img):
34
+ predictions = pipeline(input_img)
35
+ return input_img, {p["label"]: p["score"] for p in predictions}
36
+
37
+ gradio_app = gr.Interface(
38
+ predict,
39
+ inputs=gr.Image(label="Select hot dog candidate", sources=['upload', 'webcam'], type="pil"),
40
+ outputs=[gr.Image(label="Processed Image"), gr.Label(label="Result", num_top_classes=2)],
41
+ title="Hot Dog? Or Not?",
42
+ )
43
+
44
+ if __name__ == "__main__":
45
+ gradio_app.launch()