Jellyfish042 commited on
Commit
3b55740
1 Parent(s): 0c37b21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -2,10 +2,9 @@ import gradio as gr
2
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
3
 
4
  tokenizer = AutoTokenizer.from_pretrained("google/mt5-small")
5
- model = AutoModelForSeq2SeqLM.from_pretrained("./model/")
6
 
7
  def text_processing(text):
8
-
9
  text = text + ' ' if text[-2:] != ' ' else text # 在末尾加上空格有利于模型预测
10
  inputs = [text]
11
 
 
2
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
3
 
4
  tokenizer = AutoTokenizer.from_pretrained("google/mt5-small")
5
+ model = AutoModelForSeq2SeqLM.from_pretrained("./checkpoint-2500/")
6
 
7
  def text_processing(text):
 
8
  text = text + ' ' if text[-2:] != ' ' else text # 在末尾加上空格有利于模型预测
9
  inputs = [text]
10