Spaces:
Running
on
T4
Running
on
T4
Upload folder using huggingface_hub
Browse files- app.py +7 -6
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
-
import
|
| 2 |
-
from fastrtc import Stream, get_twilio_turn_credentials
|
| 3 |
-
from huggingface_hub import hf_hub_download
|
| 4 |
-
from fastapi.responses import HTMLResponse
|
| 5 |
from pathlib import Path
|
|
|
|
|
|
|
| 6 |
import gradio as gr
|
|
|
|
|
|
|
| 7 |
from gradio.utils import get_space
|
| 8 |
-
import
|
| 9 |
from pydantic import BaseModel, Field
|
| 10 |
|
| 11 |
-
|
| 12 |
try:
|
| 13 |
from demo.object_detection.inference import YOLOv10
|
| 14 |
except (ImportError, ModuleNotFoundError):
|
|
@@ -37,6 +37,7 @@ stream = Stream(
|
|
| 37 |
mode="send-receive",
|
| 38 |
additional_inputs=[gr.Slider(minimum=0, maximum=1, step=0.01, value=0.3)],
|
| 39 |
rtc_configuration=get_twilio_turn_credentials() if get_space() else None,
|
|
|
|
| 40 |
)
|
| 41 |
|
| 42 |
|
|
|
|
| 1 |
+
import json
|
|
|
|
|
|
|
|
|
|
| 2 |
from pathlib import Path
|
| 3 |
+
|
| 4 |
+
import cv2
|
| 5 |
import gradio as gr
|
| 6 |
+
from fastapi.responses import HTMLResponse
|
| 7 |
+
from fastrtc import Stream, get_twilio_turn_credentials
|
| 8 |
from gradio.utils import get_space
|
| 9 |
+
from huggingface_hub import hf_hub_download
|
| 10 |
from pydantic import BaseModel, Field
|
| 11 |
|
|
|
|
| 12 |
try:
|
| 13 |
from demo.object_detection.inference import YOLOv10
|
| 14 |
except (ImportError, ModuleNotFoundError):
|
|
|
|
| 37 |
mode="send-receive",
|
| 38 |
additional_inputs=[gr.Slider(minimum=0, maximum=1, step=0.01, value=0.3)],
|
| 39 |
rtc_configuration=get_twilio_turn_credentials() if get_space() else None,
|
| 40 |
+
concurrency_limit=20 if get_space() else None,
|
| 41 |
)
|
| 42 |
|
| 43 |
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
fastrtc
|
| 2 |
opencv-python
|
| 3 |
twilio
|
| 4 |
onnxruntime-gpu
|
|
|
|
| 1 |
+
fastrtc
|
| 2 |
opencv-python
|
| 3 |
twilio
|
| 4 |
onnxruntime-gpu
|