Commit
·
5a41550
1
Parent(s):
bc828c5
Refactor imports and remove unused code
Browse files
main.py
CHANGED
@@ -1,28 +1,26 @@
|
|
1 |
import os
|
2 |
import random
|
|
|
3 |
from pathlib import Path
|
4 |
from statistics import mean
|
5 |
from typing import Any, Iterator, Union
|
6 |
-
|
7 |
import fasttext
|
|
|
8 |
from dotenv import load_dotenv
|
9 |
from fastapi import FastAPI
|
10 |
from httpx import AsyncClient, Client, Timeout
|
11 |
from huggingface_hub import hf_hub_download
|
12 |
from huggingface_hub.utils import logging
|
13 |
-
from toolz import concat, groupby, valmap
|
14 |
-
from starlette.responses import RedirectResponse
|
15 |
-
from cashews import cache
|
16 |
-
from datetime import timedelta
|
17 |
-
import logging
|
18 |
from iso639 import Lang
|
|
|
|
|
19 |
|
20 |
cache.setup("mem://")
|
21 |
|
22 |
|
23 |
logger = logging.getLogger(__name__)
|
24 |
app = FastAPI()
|
25 |
-
# logger = logging.get_logger(__name__)
|
26 |
load_dotenv()
|
27 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
28 |
|
|
|
1 |
import os
|
2 |
import random
|
3 |
+
from datetime import timedelta
|
4 |
from pathlib import Path
|
5 |
from statistics import mean
|
6 |
from typing import Any, Iterator, Union
|
7 |
+
|
8 |
import fasttext
|
9 |
+
from cashews import cache
|
10 |
from dotenv import load_dotenv
|
11 |
from fastapi import FastAPI
|
12 |
from httpx import AsyncClient, Client, Timeout
|
13 |
from huggingface_hub import hf_hub_download
|
14 |
from huggingface_hub.utils import logging
|
|
|
|
|
|
|
|
|
|
|
15 |
from iso639 import Lang
|
16 |
+
from starlette.responses import RedirectResponse
|
17 |
+
from toolz import concat, groupby, valmap
|
18 |
|
19 |
cache.setup("mem://")
|
20 |
|
21 |
|
22 |
logger = logging.getLogger(__name__)
|
23 |
app = FastAPI()
|
|
|
24 |
load_dotenv()
|
25 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
26 |
|