mirror of
https://github.com/open-webui/open-webui
synced 2024-11-24 21:13:59 +00:00
Optimize imports
This commit is contained in:
parent
02577f6a45
commit
59d2c670ba
@ -1,5 +1,12 @@
|
|||||||
import os
|
import hashlib
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
import uuid
|
||||||
|
from functools import lru_cache
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import requests
|
||||||
from fastapi import (
|
from fastapi import (
|
||||||
FastAPI,
|
FastAPI,
|
||||||
Request,
|
Request,
|
||||||
@ -8,34 +15,14 @@ from fastapi import (
|
|||||||
status,
|
status,
|
||||||
UploadFile,
|
UploadFile,
|
||||||
File,
|
File,
|
||||||
Form,
|
|
||||||
)
|
)
|
||||||
from fastapi.responses import StreamingResponse, JSONResponse, FileResponse
|
|
||||||
|
|
||||||
from fastapi.middleware.cors import CORSMiddleware
|
from fastapi.middleware.cors import CORSMiddleware
|
||||||
|
from fastapi.responses import FileResponse
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
|
||||||
import uuid
|
|
||||||
import requests
|
|
||||||
import hashlib
|
|
||||||
from pathlib import Path
|
|
||||||
import json
|
|
||||||
|
|
||||||
from constants import ERROR_MESSAGES
|
|
||||||
from utils.utils import (
|
|
||||||
decode_token,
|
|
||||||
get_current_user,
|
|
||||||
get_verified_user,
|
|
||||||
get_admin_user,
|
|
||||||
)
|
|
||||||
from utils.misc import calculate_sha256
|
|
||||||
|
|
||||||
|
|
||||||
from config import (
|
from config import (
|
||||||
SRC_LOG_LEVELS,
|
SRC_LOG_LEVELS,
|
||||||
CACHE_DIR,
|
CACHE_DIR,
|
||||||
UPLOAD_DIR,
|
|
||||||
WHISPER_MODEL,
|
WHISPER_MODEL,
|
||||||
WHISPER_MODEL_DIR,
|
WHISPER_MODEL_DIR,
|
||||||
WHISPER_MODEL_AUTO_UPDATE,
|
WHISPER_MODEL_AUTO_UPDATE,
|
||||||
@ -52,6 +39,12 @@ from config import (
|
|||||||
AUDIO_TTS_VOICE,
|
AUDIO_TTS_VOICE,
|
||||||
AppConfig,
|
AppConfig,
|
||||||
)
|
)
|
||||||
|
from constants import ERROR_MESSAGES
|
||||||
|
from utils.utils import (
|
||||||
|
get_current_user,
|
||||||
|
get_verified_user,
|
||||||
|
get_admin_user,
|
||||||
|
)
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
log.setLevel(SRC_LOG_LEVELS["AUDIO"])
|
log.setLevel(SRC_LOG_LEVELS["AUDIO"])
|
||||||
|
Loading…
Reference in New Issue
Block a user