Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -17,8 +17,8 @@ stream = Stream(
|
|
| 17 |
handler=CodeHandler,
|
| 18 |
modality="audio",
|
| 19 |
mode="send-receive",
|
| 20 |
-
concurrency_limit=10,
|
| 21 |
-
time_limit=90,
|
| 22 |
)
|
| 23 |
|
| 24 |
stream.ui = ui
|
|
|
|
| 17 |
handler=CodeHandler,
|
| 18 |
modality="audio",
|
| 19 |
mode="send-receive",
|
| 20 |
+
concurrency_limit=10 if get_space() else None,
|
| 21 |
+
time_limit=90 if get_space() else None,
|
| 22 |
)
|
| 23 |
|
| 24 |
stream.ui = ui
|
ui.py
CHANGED
|
@@ -63,8 +63,8 @@ with gr.Blocks(css=".code-component {max-height: 500px !important}") as demo:
|
|
| 63 |
CodeHandler,
|
| 64 |
inputs=[webrtc, history, code],
|
| 65 |
outputs=[webrtc],
|
| 66 |
-
time_limit=90,
|
| 67 |
-
concurrency_limit=10,
|
| 68 |
)
|
| 69 |
webrtc.on_additional_outputs(
|
| 70 |
lambda history, code: (history, code, history), outputs=[history, code, cb]
|
|
|
|
| 63 |
CodeHandler,
|
| 64 |
inputs=[webrtc, history, code],
|
| 65 |
outputs=[webrtc],
|
| 66 |
+
time_limit=90 if get_space() else None,
|
| 67 |
+
concurrency_limit=10 if get_space() else None,
|
| 68 |
)
|
| 69 |
webrtc.on_additional_outputs(
|
| 70 |
lambda history, code: (history, code, history), outputs=[history, code, cb]
|