wiusdy commited on
Commit
49f9a57
1 Parent(s): aa6bf48

solving bugs

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
  import os
3
 
 
4
  from inference import Inference
5
 
6
  inference = Inference()
@@ -14,7 +15,8 @@ with gr.Blocks() as block:
14
  txt_3 = gr.Textbox(value="", label="Your answer is here..")
15
  btn = gr.Button(value="Submit")
16
 
17
- frame = os.path.join(os.path.dirname(__file__), "testing.jpg")
 
18
  inference.logger.info(f"Image loaded {frame.shape}")
19
  image = gr.Image(type="pil", value=frame)
20
 
 
1
  import gradio as gr
2
  import os
3
 
4
+ from PIL import Image
5
  from inference import Inference
6
 
7
  inference = Inference()
 
15
  txt_3 = gr.Textbox(value="", label="Your answer is here..")
16
  btn = gr.Button(value="Submit")
17
 
18
+ frame_path = os.path.join(os.path.dirname(__file__), "testing.jpg")
19
+ frame = Image.open(frame_path)
20
  inference.logger.info(f"Image loaded {frame.shape}")
21
  image = gr.Image(type="pil", value=frame)
22