litav commited on
Commit
0c7d8ae
verified
1 Parent(s): 95d9553

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,7 @@ model = CustomModel()
8
 
9
  def predict(image: Image.Image):
10
  # 讝诪谉 讞讬砖讜讘 诪讜讚诇 (诪讚讜诪讛)
11
- time.sleep(5) # 谞讬转谉 诇砖谞讜转 讗转 讝诪谉 讛注讬讘讜讚 诇住讬诪讜诇爪讬讛
12
 
13
  # 讛驻注诇转 讛诪讜讚诇 讻讚讬 诇住讜讜讙 讗转 讛转诪讜谞讛
14
  label, confidence = model.predict(image)
@@ -32,7 +32,7 @@ with gr.Blocks() as demo:
32
  image_input = gr.Image(type="pil", label="Upload an image")
33
 
34
  # 讜讬讚讗讜 讗谞讬诪爪讬讛 (诪讜住转专 讘讛转讞诇讛)
35
- animation = gr.Video("https://cdn-uploads.huggingface.co/production/uploads/66d6f1b3b50e35e1709bfdf7/x7Ud8PO9QPfmrTvBVcCKE.mp4", visible=False, elem_id="loading_video")
36
 
37
  # 转讜爪讗讜转
38
  output_label = gr.Textbox(label="Classification Result", visible=False)
 
8
 
9
  def predict(image: Image.Image):
10
  # 讝诪谉 讞讬砖讜讘 诪讜讚诇 (诪讚讜诪讛)
11
+ time.sleep(2) # 谞讬转谉 诇砖谞讜转 讗转 讝诪谉 讛注讬讘讜讚 诇住讬诪讜诇爪讬讛
12
 
13
  # 讛驻注诇转 讛诪讜讚诇 讻讚讬 诇住讜讜讙 讗转 讛转诪讜谞讛
14
  label, confidence = model.predict(image)
 
32
  image_input = gr.Image(type="pil", label="Upload an image")
33
 
34
  # 讜讬讚讗讜 讗谞讬诪爪讬讛 (诪讜住转专 讘讛转讞诇讛)
35
+ animation = gr.Video("https://cdn-uploads.huggingface.co/production/uploads/66d6f1b3b50e35e1709bfdf7/x7Ud8PO9QPfmrTvBVcCKE.mp4", visible=True, elem_id="loading_video")
36
 
37
  # 转讜爪讗讜转
38
  output_label = gr.Textbox(label="Classification Result", visible=False)