IBounhas commited on
Commit
9ceb0bd
·
1 Parent(s): c91cb5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -2
app.py CHANGED
@@ -1,3 +1,17 @@
1
  import gradio as gr
2
- inputs=gr.Textbox()
3
- print(inputs)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+
3
+ # Define a function that takes a text input and returns the result
4
+ def analyze_text(input_text):
5
+ # Your processing or model inference code here
6
+ result = f"You entered: {input_text}"
7
+ return result
8
+
9
+ # Create a Gradio interface with a text input zone
10
+ iface = gr.Interface(
11
+ fn=analyze_text, # The function to be called with user input
12
+ inputs=gr.Textbox(), # Textbox component for text input
13
+ outputs="text" # Display the result as text
14
+ )
15
+
16
+ # Launch the Gradio interface
17
+ iface.launch()