MohammedNasser commited on
Commit
4c8e89a
1 Parent(s): 17da7df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -1,13 +1,13 @@
1
- import gradio as gr
2
-
3
- prompt = "prompt text"
4
-
5
- def txt2img(prompt):
6
-
7
- image = pipe(prompt, height=768, width=768, guidance_scale = 10).images[0]
8
-
9
- image.save("sd_image.png")
10
-
11
- return image
12
-
13
- gr.Interface(txt2img, gr.Text(), gr.Image(), title = 'Gradio UI for selfart').launch(share = True, debug = True)
 
1
+ import gradio as gr
2
+ import numpy as np
3
+
4
+ def flip(im):
5
+ return np.flipud(im)
6
+
7
+ catchcam = gr.Interface(
8
+ flip,
9
+ gr.Image(source="webcam", streaming=True),
10
+ "image",
11
+ live=True
12
+ )
13
+ catchcam.launch()