lanzhiwang commited on
Commit
b50fbec
·
1 Parent(s): 3356d34

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 pipeline
3
  from transformers import AutoTokenizer, AutoModelForCausalLM
4
 
5
- tokenizer = AutoTokenizer.from_pretrained(pretrained_model_name_or_path="/root/.cache/huggingface/hub//models")
6
- model = AutoModelForCausalLM.from_pretrained(pretrained_model_name_or_path="/root/.cache/huggingface/hub//models")
7
  generator = pipeline('text-generation', model=model, tokenizer=tokenizer)
8
 
9
  def generate(text):
 
2
  from transformers import pipeline
3
  from transformers import AutoTokenizer, AutoModelForCausalLM
4
 
5
+ tokenizer = AutoTokenizer.from_pretrained(pretrained_model_name_or_path="/root/.cache/huggingface/hub/models")
6
+ model = AutoModelForCausalLM.from_pretrained(pretrained_model_name_or_path="/root/.cache/huggingface/hub/models")
7
  generator = pipeline('text-generation', model=model, tokenizer=tokenizer)
8
 
9
  def generate(text):