avin1103 commited on
Commit
afdcfce
·
1 Parent(s): 455b1b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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("avin1103/SEngine", use_auth_token=access_token)
8
- model = AutoModelForSequenceClassification.from_pretrained("avin1103/SEngine", 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,7 +31,7 @@ iface1 = gr.Interface(
31
  # iface1.launch()
32
 
33
 
34
- interface = gr.Interface.load("models/avin1103/SEngine", 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"),
 
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"),