Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from
|
2 |
from base64 import b64encode
|
3 |
from speech_recognition import AudioFile, Recognizer
|
4 |
import numpy as np
|
@@ -9,8 +9,8 @@ from fastapi import FastAPI, File, UploadFile, Form
|
|
9 |
from utils import tts, read_image_file, pil_to_base64, base64_to_pil, get_hist
|
10 |
from typing import Optional
|
11 |
|
12 |
-
|
13 |
-
|
14 |
|
15 |
app = FastAPI()
|
16 |
defaul_bot_voice = "γγ―γγγγγγγΎγ"
|
|
|
1 |
+
from ultralytics import YOLO
|
2 |
from base64 import b64encode
|
3 |
from speech_recognition import AudioFile, Recognizer
|
4 |
import numpy as np
|
|
|
9 |
from utils import tts, read_image_file, pil_to_base64, base64_to_pil, get_hist
|
10 |
from typing import Optional
|
11 |
|
12 |
+
model = YOLO('code/yolov8s.pt')
|
13 |
+
CLASS = model.model.names
|
14 |
|
15 |
app = FastAPI()
|
16 |
defaul_bot_voice = "γγ―γγγγγγγΎγ"
|