theekshana
commited on
Commit
•
dad185d
1
Parent(s):
4cd6173
torch_dtype=torch.float32
Browse files
model.py
CHANGED
@@ -4,7 +4,7 @@ from langchain_openai import OpenAI
|
|
4 |
# from huggingface_hub import login
|
5 |
from dotenv import load_dotenv
|
6 |
from logging import getLogger
|
7 |
-
import streamlit as st
|
8 |
import torch
|
9 |
|
10 |
load_dotenv()
|
@@ -24,6 +24,7 @@ def get_local_model(model_name_or_path:str)->pipeline:
|
|
24 |
)
|
25 |
model = AutoModelForSeq2SeqLM.from_pretrained(
|
26 |
model_name_or_path,
|
|
|
27 |
token = hf_token
|
28 |
)
|
29 |
pipe = pipeline(
|
|
|
4 |
# from huggingface_hub import login
|
5 |
from dotenv import load_dotenv
|
6 |
from logging import getLogger
|
7 |
+
# import streamlit as st
|
8 |
import torch
|
9 |
|
10 |
load_dotenv()
|
|
|
24 |
)
|
25 |
model = AutoModelForSeq2SeqLM.from_pretrained(
|
26 |
model_name_or_path,
|
27 |
+
torch_dtype=torch.float32,
|
28 |
token = hf_token
|
29 |
)
|
30 |
pipe = pipeline(
|