Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,8 +4,8 @@ from transformers import pipeline
|
|
| 4 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, TextClassificationPipeline
|
| 5 |
access_token = "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"
|
| 6 |
|
| 7 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 8 |
-
model = AutoModelForSequenceClassification.from_pretrained("
|
| 9 |
pipe1 = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True)
|
| 10 |
pipe2 = pipeline("zero-shot-classification", model="facebook/bart-large-mnli", multi_class=True)
|
| 11 |
|
|
@@ -31,7 +31,7 @@ iface1 = gr.Interface(
|
|
| 31 |
# iface1.launch()
|
| 32 |
|
| 33 |
|
| 34 |
-
interface = gr.Interface.load("models/
|
| 35 |
description ="Input the Veteran's Free Text to generate a SI score",
|
| 36 |
inputs = [ gr.inputs.Textbox(lines=7, label="Veteran's Free Text")],
|
| 37 |
outputs=gr.Label(label="output"),
|
|
|
|
| 4 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, TextClassificationPipeline
|
| 5 |
access_token = "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"
|
| 6 |
|
| 7 |
+
tokenizer = AutoTokenizer.from_pretrained("sokat/ssie-model", use_auth_token=access_token)
|
| 8 |
+
model = AutoModelForSequenceClassification.from_pretrained("sokat/ssie-model", use_auth_token=access_token)
|
| 9 |
pipe1 = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True)
|
| 10 |
pipe2 = pipeline("zero-shot-classification", model="facebook/bart-large-mnli", multi_class=True)
|
| 11 |
|
|
|
|
| 31 |
# iface1.launch()
|
| 32 |
|
| 33 |
|
| 34 |
+
interface = gr.Interface.load("models/sokat/ssie-model", title = "SoKat Suicide Ideation Engine (SSIE) - Case Study 2",
|
| 35 |
description ="Input the Veteran's Free Text to generate a SI score",
|
| 36 |
inputs = [ gr.inputs.Textbox(lines=7, label="Veteran's Free Text")],
|
| 37 |
outputs=gr.Label(label="output"),
|