Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,17 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|