Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -1,16 +1,13 @@
|
|
1 |
from fastapi import FastAPI
|
2 |
from fastapi.staticfiles import StaticFiles
|
3 |
from fastapi.responses import FileResponse
|
4 |
-
from transformers import pipeline
|
5 |
from pysbd import Segmenter
|
6 |
|
7 |
app = FastAPI()
|
8 |
segmenter = Segmenter(language='en', clean=False)
|
9 |
-
model = AutoModelForSequenceClassification.from_pretrained("remzicam/privacy_intent")
|
10 |
-
tokenizer = AutoTokenizer.from_pretrained("mukund/privbert")
|
11 |
privacy_intent_pipe = pipeline("text-classification",
|
12 |
-
|
13 |
-
tokenizer = tokenizer)
|
14 |
|
15 |
def doc2sent(text:str)-> dict:
|
16 |
"""
|
|
|
1 |
from fastapi import FastAPI
|
2 |
from fastapi.staticfiles import StaticFiles
|
3 |
from fastapi.responses import FileResponse
|
4 |
+
from transformers import pipeline
|
5 |
from pysbd import Segmenter
|
6 |
|
7 |
app = FastAPI()
|
8 |
segmenter = Segmenter(language='en', clean=False)
|
|
|
|
|
9 |
privacy_intent_pipe = pipeline("text-classification",
|
10 |
+
"remzicam/privacy_intent" )
|
|
|
11 |
|
12 |
def doc2sent(text:str)-> dict:
|
13 |
"""
|