Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,14 +5,18 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
5 |
tokenizer = AutoTokenizer.from_pretrained("qbwmwsap/amber-model-mine")
|
6 |
model = AutoModelForCausalLM.from_pretrained("qbwmwsap/amber-model-mine")
|
7 |
|
8 |
-
|
|
|
|
|
9 |
|
10 |
if text:
|
|
|
11 |
input_ids = tokenizer(text, return_tensors="pt").input_ids
|
12 |
-
|
13 |
# Run the model and get the output
|
14 |
outputs = model.generate(input_ids)
|
15 |
-
|
16 |
# Postprocess your output here if necessary
|
17 |
output = tokenizer.decode(outputs[0])
|
18 |
-
|
|
|
|
5 |
tokenizer = AutoTokenizer.from_pretrained("qbwmwsap/amber-model-mine")
|
6 |
model = AutoModelForCausalLM.from_pretrained("qbwmwsap/amber-model-mine")
|
7 |
|
8 |
+
st.title('Amber-Model-Mine')
|
9 |
+
|
10 |
+
text = st.text_input('Enter some text')
|
11 |
|
12 |
if text:
|
13 |
+
# Preprocess your data here
|
14 |
input_ids = tokenizer(text, return_tensors="pt").input_ids
|
15 |
+
|
16 |
# Run the model and get the output
|
17 |
outputs = model.generate(input_ids)
|
18 |
+
|
19 |
# Postprocess your output here if necessary
|
20 |
output = tokenizer.decode(outputs[0])
|
21 |
+
|
22 |
+
st.write(output)
|