Spaces:
Sleeping
Sleeping
from ultralytics import YOLO | |
from base64 import b64encode | |
from speech_recognition import AudioFile, Recognizer | |
import numpy as np | |
from scipy.spatial import distance as dist | |
from sahi.utils.cv import read_image_as_pil | |
from fastapi import FastAPI, File, UploadFile, Form | |
from utils import tts, read_image_file, pil_to_base64, base64_to_pil, get_hist | |
from typing import Optional | |
from huggingface_hub import hf_hub_download | |
model_path = hf_hub_download(repo_id="ultralyticsplus/yolov8s", filename='yolov8s.pt') | |
model = YOLO(model_path) | |
CLASS = model.model.names | |
defaul_bot_voice = "γγ―γγγγγγγΎγ" | |
area_thres = 0.3 | |
app = FastAPI() | |
def read_root(): | |
return {"Hello": "World!"} |