Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import time
|
| 3 |
-
|
| 4 |
import torch
|
|
|
|
| 5 |
|
| 6 |
#@st.cache(allow_output_mutation=True)
|
| 7 |
#def define_model():
|
|
@@ -9,8 +10,6 @@ import torch
|
|
| 9 |
# tokenizer = AutoTokenizer.from_pretrained("facebook/opt-1.3b", use_fast=False)
|
| 10 |
# return model, tokenizer
|
| 11 |
|
| 12 |
-
from transformers import pipeline
|
| 13 |
-
|
| 14 |
generator = pipeline('text-generation', model="facebook/opt-1.3b")
|
| 15 |
answer = generator("Hello, I'm am conscious and")
|
| 16 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import time
|
| 3 |
+
from transformers import pipeline
|
| 4 |
import torch
|
| 5 |
+
#from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 6 |
|
| 7 |
#@st.cache(allow_output_mutation=True)
|
| 8 |
#def define_model():
|
|
|
|
| 10 |
# tokenizer = AutoTokenizer.from_pretrained("facebook/opt-1.3b", use_fast=False)
|
| 11 |
# return model, tokenizer
|
| 12 |
|
|
|
|
|
|
|
| 13 |
generator = pipeline('text-generation', model="facebook/opt-1.3b")
|
| 14 |
answer = generator("Hello, I'm am conscious and")
|
| 15 |
|