thinh-huynh-re commited on
Commit
4e70b70
1 Parent(s): 6e2081d
Files changed (3) hide show
  1. .gitignore +1 -0
  2. app.py +1 -1
  3. camera.py +12 -0
.gitignore CHANGED
@@ -5,3 +5,4 @@ samples/*
5
  !samples/.gitkeep
6
  model_cache
7
  image_processor_cache
 
 
5
  !samples/.gitkeep
6
  model_cache
7
  image_processor_cache
8
+ flagged
app.py CHANGED
@@ -23,4 +23,4 @@ demo = gr.Interface(
23
 
24
 
25
  if __name__ == "__main__":
26
- demo.launch(enable_queue=True)
 
23
 
24
 
25
  if __name__ == "__main__":
26
+ demo.launch(server_name="0.0.0.0")
camera.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import numpy as np
3
+
4
+
5
+ def flip(im):
6
+ return np.flipud(im)
7
+
8
+
9
+ demo = gr.Interface(flip, gr.Image(source="webcam", streaming=True), "image", live=True)
10
+
11
+ if __name__ == "__main__":
12
+ demo.launch(server_name="0.0.0.0", server_port=8501)