Spaces:
Runtime error
Runtime error
Update app.py
Browse files108 unmodified lines10911011111211211311434 unmodified lines149150151153152153154155156108 unmodified lines
model2 = AutoModelForSequenceClassification.from_pretrained("AlGe/deberta-v3-large_seq_ext", num_labels=1, token=auth_token)
@spaces.GPU# Define functions to process inputsdef process_ner(text, pipeline): output = pipeline(text)34 unmodified lines score = prediction1 / (prediction2 + prediction1)
return f"{round(prediction1, 1)}", f"{round(prediction2, 1)}", f"{round(score, 2)}"
@spaces.GPUdef all(text): return process_ner(text, pipe_bin), process_ner(text, pipe_ext), process_classification(text, model1, model2, tokenizer1)[0], process_classification(text, model1, model2, tokenizer1)[1], process_classification(text, model1, model2, tokenizer1)[2]
app.py+2-2