Spaces:
Runtime error
Runtime error
omerXfaruq
commited on
Commit
•
0f91911
1
Parent(s):
6a49f11
Add example app and requirements
Browse files- app.py +26 -0
- requirements.txt +1 -0
app.py
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def greet(spaces, hf_token, username, space_name, space_description):
|
4 |
+
return "Thank you for using the draft, it will be completed later"
|
5 |
+
|
6 |
+
iface = gr.Interface(
|
7 |
+
fn=greet,
|
8 |
+
inputs=[
|
9 |
+
gr.inputs.Textbox(
|
10 |
+
lines=4,
|
11 |
+
placeholder=(
|
12 |
+
f"Drop space links at each line, ie:\nspaces/Norod78/ComicsHeroHD\nspaces/Amrrs/gradio-sentiment-analyzer"
|
13 |
+
)
|
14 |
+
),
|
15 |
+
gr.inputs.Textbox(lines=1, placeholder="HF Read Token"),
|
16 |
+
gr.inputs.Textbox(lines=1, placeholder="Your username"),
|
17 |
+
gr.inputs.Textbox(lines=1, placeholder="Name for the space"),
|
18 |
+
gr.inputs.Textbox(lines=1, placeholder="Description for the space"),
|
19 |
+
|
20 |
+
],
|
21 |
+
outputs="text",
|
22 |
+
title = "Test Space",
|
23 |
+
description = "Sample Test Space",
|
24 |
+
)
|
25 |
+
|
26 |
+
iface.launch(inline = False)
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
gradio
|