Bagi4 commited on
Commit
dce67e9
1 Parent(s): 67afbfb

fix: requirements.txt

Browse files
Files changed (2) hide show
  1. main.py +5 -1
  2. requirements.txt +0 -0
main.py CHANGED
@@ -1,4 +1,5 @@
1
  import logging
 
2
  from fastapi import FastAPI
3
  from pydantic import BaseModel
4
  from transformers import pipeline
@@ -8,7 +9,7 @@ logging.basicConfig(
8
  level=logging.DEBUG,
9
  datefmt='%Y-%m-%d %H:%M:%S'
10
  )
11
- classifier = pipeline("zero-shot-classification", model="models/classificator", use_fast=True)
12
  app = FastAPI()
13
 
14
 
@@ -36,3 +37,6 @@ async def classify_text(data: RequestData):
36
  def ping():
37
  return "pong"
38
 
 
 
 
 
1
  import logging
2
+ import uvicorn
3
  from fastapi import FastAPI
4
  from pydantic import BaseModel
5
  from transformers import pipeline
 
9
  level=logging.DEBUG,
10
  datefmt='%Y-%m-%d %H:%M:%S'
11
  )
12
+ classifier = pipeline("zero-shot-classification", model="models/classificator", use_fast=False)
13
  app = FastAPI()
14
 
15
 
 
37
  def ping():
38
  return "pong"
39
 
40
+
41
+ if __name__ == "__main__":
42
+ uvicorn.run(app, host="127.0.0.1", port=8000)
requirements.txt CHANGED
Binary files a/requirements.txt and b/requirements.txt differ