whatever1 / app.py
bakuaifuji's picture
Update app.py
ba56fa8
raw
history blame contribute delete
368 Bytes
from transformers import pipeline
import gradio as gr
import logging
def hello(i):
classifier = pipeline("sentiment-analysis")
a = classifier(i)
logging.warning('鏂囨湰鍒嗙被缁撴潫')
logging.info('鏂囨湰鍒嗙被缁撴潫info')
while True:
print('test')
return a
iface = gr.Interface(fn=hello, inputs="text", outputs="text")
iface.launch()