Spaces:
Runtime error
Runtime error
Jayra Ortiz commited on
Commit ·
4408019
1
Parent(s): ce0af40
:bug: fixed unused entities
Browse files- core/similarity/service.py +0 -3
- main.py +2 -8
core/similarity/service.py
CHANGED
|
@@ -5,9 +5,6 @@ import spacy
|
|
| 5 |
from core.models.reports import ReportConfiguration
|
| 6 |
import nltk
|
| 7 |
|
| 8 |
-
spacy.cli.download("en_core_web_sm")
|
| 9 |
-
spacy.cli.download("en_core_web_md")
|
| 10 |
-
|
| 11 |
class EntityManager:
|
| 12 |
def __init__(self, text):
|
| 13 |
|
|
|
|
| 5 |
from core.models.reports import ReportConfiguration
|
| 6 |
import nltk
|
| 7 |
|
|
|
|
|
|
|
|
|
|
| 8 |
class EntityManager:
|
| 9 |
def __init__(self, text):
|
| 10 |
|
main.py
CHANGED
|
@@ -3,23 +3,17 @@ import uvicorn
|
|
| 3 |
from utils.settings import app
|
| 4 |
from fastapi import UploadFile
|
| 5 |
|
| 6 |
-
import pandas as pd
|
| 7 |
import aiofiles
|
| 8 |
|
| 9 |
from starlette import status
|
| 10 |
from starlette.responses import JSONResponse
|
| 11 |
-
from core.parser.
|
| 12 |
-
from core.parser.task import extractor_task, list_dict_to_str_parser
|
| 13 |
-
from core.similarity.service import EntityManager
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
@app.post("/api/parse-file")
|
| 18 |
async def upload_config_file_to_s3(
|
| 19 |
-
file: UploadFile
|
| 20 |
-
checkpoint_name: str,
|
| 21 |
-
scraper: str = "base_parser",
|
| 22 |
-
checkpoint_layer: str = "tier_0",
|
| 23 |
):
|
| 24 |
try:
|
| 25 |
file_path = f'./{file.filename}'
|
|
|
|
| 3 |
from utils.settings import app
|
| 4 |
from fastapi import UploadFile
|
| 5 |
|
|
|
|
| 6 |
import aiofiles
|
| 7 |
|
| 8 |
from starlette import status
|
| 9 |
from starlette.responses import JSONResponse
|
| 10 |
+
from core.parser.task import extractor_task
|
|
|
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
@app.post("/api/parse-file")
|
| 15 |
async def upload_config_file_to_s3(
|
| 16 |
+
file: UploadFile
|
|
|
|
|
|
|
|
|
|
| 17 |
):
|
| 18 |
try:
|
| 19 |
file_path = f'./{file.filename}'
|