Almahfouz commited on
Commit
186e5a8
·
verified ·
1 Parent(s): d24e90e

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
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
+ # Create a Gradio interface
8
+ iface = gr.Interface(
9
+ fn=reverse_text, # Function to use for processing
10
+ inputs="text", # Input type: text
11
+ outputs="text", # Output type: text
12
+ title="Text Reverser", # Title of the interface
13
+ description="Enter text and it will be reversed!" # Description
14
+ )
15
+
16
+ # Launch the interface
17
+ iface.launch()