Nitzantry1 commited on
Commit
2192faa
ยท
verified ยท
1 Parent(s): 34e335d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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("gpt2")
6
- tokenizer = AutoTokenizer.from_pretrained("gpt2")
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):