vumichien commited on
Commit
06bad2e
Β·
1 Parent(s): 0f28b51

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +16 -1
main.py CHANGED
@@ -1,5 +1,20 @@
1
- from fastapi import FastAPI
 
 
 
 
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  app = FastAPI()
4
 
5
  @app.get("/")
 
1
+ from ultralyticsplus import YOLO
2
+ from base64 import b64encode
3
+ from speech_recognition import AudioFile, Recognizer
4
+ import numpy as np
5
+ from scipy.spatial import distance as dist
6
 
7
+ from sahi.utils.cv import read_image_as_pil
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
+ model = YOLO('ultralyticsplus/yolov8s')
13
+ CLASS = model.model.names
14
+
15
+ app = FastAPI()
16
+ defaul_bot_voice = "γŠγ―γ„γ‚ˆγ†γ”γ–γ„γΎγ™"
17
+ area_thres = 0.3
18
  app = FastAPI()
19
 
20
  @app.get("/")