seawolf2357 commited on
Commit
0bc763e
ยท
verified ยท
1 Parent(s): 8327cee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
@@ -8,10 +11,10 @@ def classify_image(image):
8
  predictions = model(image)
9
  return predictions
10
 
11
- # Gradio ์ธํ„ฐํŽ˜์ด์Šค ์ƒ์„ฑ (์ˆ˜์ •๋œ ๋ถ€๋ถ„)
12
  iface = gr.Interface(fn=classify_image,
13
- inputs=gr.Image(shape=(224, 224)),
14
- outputs=gr.Label(num_top_classes=3),
15
  title="์ด๋ฏธ์ง€ ๋ถ„๋ฅ˜๊ธฐ",
16
  description="์ด๋ฏธ์ง€๋ฅผ ์—…๋กœ๋“œํ•˜๋ฉด, ์‚ฌ๋ฌผ์„ ์ธ์‹ํ•˜๊ณ  ์„ค๋ช…์„ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค.")
17
 
 
1
+
2
+
3
+
4
  import gradio as gr
5
  from transformers import pipeline
6
 
 
11
  predictions = model(image)
12
  return predictions
13
 
14
+ # Gradio ์ธํ„ฐํŽ˜์ด์Šค ์ƒ์„ฑ (shape ์ธ์ž ์—†์ด ์ˆ˜์ •)
15
  iface = gr.Interface(fn=classify_image,
16
+ inputs=gr.inputs.Image(),
17
+ outputs=gr.outputs.Label(num_top_classes=3),
18
  title="์ด๋ฏธ์ง€ ๋ถ„๋ฅ˜๊ธฐ",
19
  description="์ด๋ฏธ์ง€๋ฅผ ์—…๋กœ๋“œํ•˜๋ฉด, ์‚ฌ๋ฌผ์„ ์ธ์‹ํ•˜๊ณ  ์„ค๋ช…์„ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค.")
20