Spaces:
Runtime error
Runtime error
yash161101
commited on
Commit
•
2c0b615
1
Parent(s):
8c60512
Update app.py
Browse files
app.py
CHANGED
@@ -12,9 +12,9 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
12 |
|
13 |
@st.cache(allow_output_mutation=True)
|
14 |
def get_model():
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
|
20 |
model, tokenizer = get_model()
|
|
|
12 |
|
13 |
@st.cache(allow_output_mutation=True)
|
14 |
def get_model():
|
15 |
+
tokenizer = AutoTokenizer.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
|
16 |
+
model = AutoModelForCausalLM.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator")
|
17 |
+
return model, tokenizer
|
18 |
|
19 |
|
20 |
model, tokenizer = get_model()
|