LiuPengNGP commited on
Commit
0876449
Β·
1 Parent(s): bf15470
Files changed (1) hide show
  1. app.py +13 -15
app.py CHANGED
@@ -1,19 +1,17 @@
1
  import gradio as gr
2
 
3
- def text_emo_analysize(text):
4
- text_outcome = my_uie.emo_analy(text)
5
- return text_outcome
 
6
 
7
- with gr.Blocks() as demo:
8
- gr.Markdown("# ζƒ…ζ„Ÿεˆ†ζžεΊ”η”¨")
9
- gr.Markdown("θΎ“ε…₯δΏ‘ζ―οΌŒθŽ·ε–ζƒ…ζ„Ÿεˆ†ζžη»“ζžœγ€‚")
 
 
 
 
10
 
11
- with gr.Row():
12
- with gr.Column():
13
- text_input = gr.Textbox(lines=2, placeholder='εœ¨θΏ™ι‡ŒθΎ“ε…₯ζ–‡ζœ¬')
14
- text_submit_button = gr.Button("ζδΊ€ζ–‡ζœ¬ζƒ…ζ„Ÿεˆ†ζž")
15
- text_output = gr.Textbox(label="ζ–‡ζœ¬ζƒ…ζ„Ÿεˆ†ζžη»“ζžœ")
16
-
17
- text_submit_button.click(text_emo_analysize, inputs=text_input, outputs=text_output)
18
-
19
- demo.launch()
 
1
  import gradio as gr
2
 
3
+ def process_image(image):
4
+ # Placeholder function to process the image
5
+ # For now, it just returns the image as is
6
+ return image
7
 
8
+ # Create a Gradio interface
9
+ iface = gr.Interface(
10
+ fn=process_image, # Function to process the image
11
+ inputs=gr.Image(source="webcam", tool="editor"), # Capture image from webcam
12
+ outputs="image", # Output type is an image
13
+ live=True # Enable live webcam feed
14
+ )
15
 
16
+ # Launch the interface
17
+ iface.launch()