koush1ki commited on
Commit
2e88b5c
·
verified ·
1 Parent(s): 97fa12d

Removed mirror webcam; not supported by gradio

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -4,13 +4,13 @@ import numpy as np
4
  from PIL import Image
5
  import tensorflow as tf
6
  tflite = tf.lite
7
- # Load TFLite model at startup
8
  interpreter = tflite.Interpreter(model_path="model_unquant.tflite")
9
  interpreter.allocate_tensors()
10
  input_details = interpreter.get_input_details()
11
  output_details = interpreter.get_output_details()
12
 
13
- # Load labels
14
  with open("labels.txt", "r") as f:
15
  labels = [line.strip().split(" ", 1)[-1] for line in f.readlines()]
16
 
@@ -158,7 +158,6 @@ with gr.Blocks(theme=theme) as demo:
158
  sources=["webcam"],
159
  streaming=True,
160
  label="Camera",
161
- mirror_webcam=True,
162
  height=300
163
  )
164
  with gr.Column(scale=1):
 
4
  from PIL import Image
5
  import tensorflow as tf
6
  tflite = tf.lite
7
+
8
  interpreter = tflite.Interpreter(model_path="model_unquant.tflite")
9
  interpreter.allocate_tensors()
10
  input_details = interpreter.get_input_details()
11
  output_details = interpreter.get_output_details()
12
 
13
+
14
  with open("labels.txt", "r") as f:
15
  labels = [line.strip().split(" ", 1)[-1] for line in f.readlines()]
16
 
 
158
  sources=["webcam"],
159
  streaming=True,
160
  label="Camera",
 
161
  height=300
162
  )
163
  with gr.Column(scale=1):