Spaces:
Runtime error
Runtime error
Update app.py
Browse files108 unmodified lines10911011111211311411534 unmodified lines150151152153154155156108 unmodified linesmodel2 = 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 linesscore = prediction1 / (prediction2 + prediction1)return f"{round(prediction1, 1)}", f"{round(prediction2, 1)}", f"{round(score, 2)}"def 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]108 unmodified lines10911011111211311434 unmodified lines149150151152153154155156108 unmodified linesmodel2 = AutoModelForSequenceClassification.from_pretrained("AlGe/deberta-v3-large_seq_ext", num_labels=1, token=auth_token)# Define functions to process inputsdef process_ner(text, pipeline):output = pipeline(text)34 unmodified linesscore = 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