Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,12 +32,8 @@ async def summarize(text: str):
|
|
32 |
return await film.run()
|
33 |
|
34 |
|
35 |
-
def chat(text):
|
36 |
-
|
37 |
-
if loop.is_running():
|
38 |
-
return asyncio.create_task(summarize(text))
|
39 |
-
else:
|
40 |
-
return asyncio.run(summarize(text))
|
41 |
|
42 |
|
43 |
iface = gr.Interface(fn=chat, inputs="text", outputs="text")
|
|
|
32 |
return await film.run()
|
33 |
|
34 |
|
35 |
+
async def chat(text):
|
36 |
+
return await summarize(text)
|
|
|
|
|
|
|
|
|
37 |
|
38 |
|
39 |
iface = gr.Interface(fn=chat, inputs="text", outputs="text")
|