remzicam commited on
Commit
27103fa
1 Parent(s): 04a7d44

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -5
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, AutoModelForSequenceClassification, AutoTokenizer
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
- model = model,
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
  """