Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ import gradio as gr
|
|
2 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
|
4 |
# ืืขืื ืช ืืืืื ืื-tokenizer
|
5 |
-
model = AutoModelForCausalLM.from_pretrained("
|
6 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
7 |
|
8 |
# ืคืื ืงืฆืื ืฉืืงืืืช ืคืจืืืคื ืืืืืืจื ืชืืืื
|
9 |
def generate_text(prompt):
|
|
|
2 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
|
4 |
# ืืขืื ืช ืืืืื ืื-tokenizer
|
5 |
+
model = AutoModelForCausalLM.from_pretrained("distilgpt2")
|
6 |
+
tokenizer = AutoTokenizer.from_pretrained("distilgpt2")
|
7 |
|
8 |
# ืคืื ืงืฆืื ืฉืืงืืืช ืคืจืืืคื ืืืืืืจื ืชืืืื
|
9 |
def generate_text(prompt):
|