Spaces:
Sleeping
Sleeping
Add application file
Browse files- app.py +23 -0
- requirements.txt +1 -0
app.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def simple_app(string: str) -> str:
|
4 |
+
"Invert the string"
|
5 |
+
return string[::-1]
|
6 |
+
|
7 |
+
if __name__ == "__main__":
|
8 |
+
title = "Text Inversion Demo"
|
9 |
+
description = "Let's say you want to invert a word - 'Andromeda'. You can do it using this awesome tool!!!! Try Me :)"
|
10 |
+
article = "<p style='text-align: center'><a href='https://www.youtube.com/watch?v=M5iVFGU3VoI&pp=ygUUaW52ZXJ0IHN0cmluZyBweXRob24%3D' target='_blank'>If you want to watch youtube tutorial</a></p>"
|
11 |
+
examples = ['Saturn']
|
12 |
+
interpretation = 'default'
|
13 |
+
enable_queue = True
|
14 |
+
|
15 |
+
gr.Interface(
|
16 |
+
fn=simple_app,
|
17 |
+
inputs='text',
|
18 |
+
outputs='text',
|
19 |
+
title=title,
|
20 |
+
description=description,
|
21 |
+
article=article,
|
22 |
+
examples=examples,
|
23 |
+
).launch(share=True)
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
gradio
|