Spaces:
Sleeping
Sleeping
Update app.py
Browse files6 unmodified lines789101112136 unmodified linesresult = pipe(text)label = result[0]['label']score = result[0]['score']res = {label:score,'POSITIVE' if label=='NEGATIVE' else 'NEGATIVE': 1-score}return resdemo = gr.Interface(fn=clf, inputs="text", outputs="label")6 unmodified lines789101112136 unmodified linesresult = pipe(text)label = result[0]['label']score = result[0]['score']res = {label:score,'positive' if label.startswith('negative') else 'negative': 1-score}return resdemo = gr.Interface(fn=clf, inputs="text", outputs="label")
app.py+1-1