Removed mirror webcam; not supported by gradio
Browse files
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 |
-
|
| 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,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):
|