remove torch
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import torch
|
2 |
import pickle
|
3 |
import streamlit as st
|
4 |
from transformers import Conversation, pipeline
|
@@ -19,7 +19,8 @@ if "model_name" not in st.session_state:
|
|
19 |
|
20 |
|
21 |
def get_pipeline(model_name):
|
22 |
-
device = 0 if torch.cuda.is_available() else -1
|
|
|
23 |
chatbot = pipeline(model=model_name, task="conversational", device=device)
|
24 |
return chatbot
|
25 |
|
|
|
1 |
+
# import torch
|
2 |
import pickle
|
3 |
import streamlit as st
|
4 |
from transformers import Conversation, pipeline
|
|
|
19 |
|
20 |
|
21 |
def get_pipeline(model_name):
|
22 |
+
# device = 0 if torch.cuda.is_available() else -1
|
23 |
+
device = -1
|
24 |
chatbot = pipeline(model=model_name, task="conversational", device=device)
|
25 |
return chatbot
|
26 |
|