from transformers import pipeline import gradio as gr translator = pipeline("translation", model = "penpen/novel-zh-en", max_time = 7) classifier = pipeline ("text-classification", model = 'bhadresh-savani/bert-base-uncased-emotion', top_k = 1) def on_click(chines_text): print('input: ', chines_text) text = translator(chines_text)[0]["translation_text"] print('translate: ', text) result = text, classifier(text) print('classify: ', result) print('----------------------------') return result with gr.Blocks() as block: gr.Markdown("