Spaces:
Sleeping
Sleeping
switch back to 90M model
Browse files
main.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from dotenv import load_dotenv
|
2 |
import os
|
3 |
|
4 |
-
from transformers import
|
5 |
from helpers import in_cache
|
6 |
|
7 |
from fastapi import FastAPI
|
@@ -13,8 +13,8 @@ from starlette.middleware.cors import CORSMiddleware
|
|
13 |
|
14 |
load_dotenv()
|
15 |
|
16 |
-
model =
|
17 |
-
tokenizer =
|
18 |
class UserMSGRequest(BaseModel):
|
19 |
message: str
|
20 |
|
|
|
1 |
from dotenv import load_dotenv
|
2 |
import os
|
3 |
|
4 |
+
from transformers import BlenderbotSmallForConditionalGeneration, AutoTokenizer
|
5 |
from helpers import in_cache
|
6 |
|
7 |
from fastapi import FastAPI
|
|
|
13 |
|
14 |
load_dotenv()
|
15 |
|
16 |
+
model = BlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M", cache_dir="new_cache_dir/")
|
17 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M", cache_dir="new_cache_dir/")
|
18 |
class UserMSGRequest(BaseModel):
|
19 |
message: str
|
20 |
|