Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,6 +33,7 @@ routes.get_types = get_types
|
|
| 33 |
|
| 34 |
q = queue.Queue()
|
| 35 |
|
|
|
|
| 36 |
# App code
|
| 37 |
def res(x, id, cdata, url):
|
| 38 |
global q
|
|
@@ -40,9 +41,15 @@ def res(x, id, cdata, url):
|
|
| 40 |
arr = [x, id, str(cdata.split(",", 1)[0]), url]
|
| 41 |
q.put(arr)
|
| 42 |
|
|
|
|
| 43 |
print("\n_Done\n\n")
|
| 44 |
return "Done"
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
with gr.Blocks() as demo:
|
| 47 |
count = 0
|
| 48 |
aa = gr.Interface(
|
|
@@ -51,4 +58,11 @@ with gr.Blocks() as demo:
|
|
| 51 |
outputs="text",
|
| 52 |
description="call",
|
| 53 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
demo.queue(max_size=32).launch(enable_queue=True)
|
|
|
|
| 33 |
|
| 34 |
q = queue.Queue()
|
| 35 |
|
| 36 |
+
arrr = []
|
| 37 |
# App code
|
| 38 |
def res(x, id, cdata, url):
|
| 39 |
global q
|
|
|
|
| 41 |
arr = [x, id, str(cdata.split(",", 1)[0]), url]
|
| 42 |
q.put(arr)
|
| 43 |
|
| 44 |
+
arrr.append(x)
|
| 45 |
print("\n_Done\n\n")
|
| 46 |
return "Done"
|
| 47 |
|
| 48 |
+
def rese(x):
|
| 49 |
+
|
| 50 |
+
print(f"{arrr}")
|
| 51 |
+
return "Done"
|
| 52 |
+
|
| 53 |
with gr.Blocks() as demo:
|
| 54 |
count = 0
|
| 55 |
aa = gr.Interface(
|
|
|
|
| 58 |
outputs="text",
|
| 59 |
description="call",
|
| 60 |
)
|
| 61 |
+
|
| 62 |
+
bb = gr.Interface(
|
| 63 |
+
fn=rese,
|
| 64 |
+
inputs=["text"],
|
| 65 |
+
outputs="text",
|
| 66 |
+
description="call",
|
| 67 |
+
)
|
| 68 |
demo.queue(max_size=32).launch(enable_queue=True)
|