Spaces:
Running
Running
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
# Function to reverse the input text
|
4 |
+
def reverse_text(text):
|
5 |
+
return text[::-1]
|
6 |
+
|
7 |
+
# Gradio interface
|
8 |
+
interface = gr.Interface(
|
9 |
+
fn=reverse_text, # Function to call
|
10 |
+
inputs="text", # Input type
|
11 |
+
outputs="text", # Output type
|
12 |
+
title="Text Reverser",
|
13 |
+
description="Enter some text, and the app will reverse it for you!"
|
14 |
+
)
|
15 |
+
|
16 |
+
# Launch the interface
|
17 |
+
interface.launch()
|