Spaces:
Runtime error
Runtime error
app.py
CHANGED
@@ -20,7 +20,14 @@ def model_init():
|
|
20 |
|
21 |
tokenizer, model = model_init()
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
# DONE 6.1s
|
26 |
|
|
|
20 |
|
21 |
tokenizer, model = model_init()
|
22 |
|
23 |
+
prompt = '我是'
|
24 |
+
with torch.no_grad():
|
25 |
+
[out] = model.generate(
|
26 |
+
**tokenizer(
|
27 |
+
prompt, return_tensors="pt"
|
28 |
+
).to(device)
|
29 |
+
)
|
30 |
+
st.text(out)
|
31 |
|
32 |
# DONE 6.1s
|
33 |
|