Spaces:
Runtime error
Runtime error
Update app.py
Browse filesfrom transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer=AutoTokenizer.from_pretrained("bert-base-chinese")
model=AutoModelForMaskedLM.from_pretrained("bert-base-chinese")
app.py
CHANGED
@@ -1,9 +1,4 @@
|
|
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 |
|
|
|
|
|
2 |
|
3 |
def predict(input, history=[]):
|
4 |
# tokenize the new input sentence
|