Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -240,7 +240,20 @@ async def on_disconnect():
|
|
240 |
)
|
241 |
|
242 |
ka()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
token = os.environ["TOKEN"]
|
244 |
if token == "":
|
245 |
raise Exception("Please add your token to the Secrets pane.")
|
|
|
246 |
client.run(token)
|
|
|
240 |
)
|
241 |
|
242 |
ka()
|
243 |
+
async def start():
|
244 |
+
import gradio as gr
|
245 |
+
def greet(name, intensity):
|
246 |
+
return "Hello " * intensity + name + "!"
|
247 |
+
|
248 |
+
demo = gr.Interface(
|
249 |
+
fn=greet,
|
250 |
+
inputs=["text", "slider"],
|
251 |
+
outputs=["text"],
|
252 |
+
)
|
253 |
+
|
254 |
+
demo.launch()
|
255 |
token = os.environ["TOKEN"]
|
256 |
if token == "":
|
257 |
raise Exception("Please add your token to the Secrets pane.")
|
258 |
+
asyncio.run(start)
|
259 |
client.run(token)
|