taining commited on
Commit
ad1a716
·
1 Parent(s): df5b2b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,9 +1,8 @@
1
- from transformers import AutoModelForCausalLM, AutoTokenizer
2
- import torch
3
- import gradio as gr
4
 
5
- tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-large")
6
- model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-large")
 
7
 
8
  def predict(input, history=[]):
9
  # tokenize the new input sentence
 
1
+ from transformers import AutoTokenizer, AutoModelForMaskedLM
 
 
2
 
3
+ tokenizer = AutoTokenizer.from_pretrained("bert-base-chinese")
4
+
5
+ model = AutoModelForMaskedLM.from_pretrained("bert-base-chinese")
6
 
7
  def predict(input, history=[]):
8
  # tokenize the new input sentence