Commit
•
10263c2
1
Parent(s):
95635fb
Changed model to roberta
Browse files
app.py
CHANGED
@@ -96,10 +96,10 @@ import tensorflow
|
|
96 |
# feedbacks += additional_feedbacks
|
97 |
|
98 |
issues = ["Misconduct" , "Negligence" , "Discrimination" , "Corruption" , "Violation of Rights" , "Inefficiency" ,
|
99 |
-
"Unprofessional Conduct", "Response Time" , "Use of Firearms" , "Property Damage"
|
100 |
|
101 |
|
102 |
-
groupByType = pipeline("zero-shot-classification" , model="
|
103 |
|
104 |
|
105 |
|
@@ -145,7 +145,7 @@ groupByType = pipeline("zero-shot-classification" , model="facebook/bart-large-m
|
|
145 |
|
146 |
|
147 |
def zeroshotclassification(feedback):
|
148 |
-
issue = groupByType(feedback , candidate_labels = issues)['labels'][0]
|
149 |
return issue
|
150 |
|
151 |
iface = gr.Interface(
|
|
|
96 |
# feedbacks += additional_feedbacks
|
97 |
|
98 |
issues = ["Misconduct" , "Negligence" , "Discrimination" , "Corruption" , "Violation of Rights" , "Inefficiency" ,
|
99 |
+
"Unprofessional Conduct", "Response Time" , "Use of Firearms" , "Property Damage"]
|
100 |
|
101 |
|
102 |
+
groupByType = pipeline("zero-shot-classification" , model="MoritzLaurer/deberta-v3-large-zeroshot-v1")
|
103 |
|
104 |
|
105 |
|
|
|
145 |
|
146 |
|
147 |
def zeroshotclassification(feedback):
|
148 |
+
issue = groupByType(feedback , candidate_labels = issues , multi_label = False)['labels'][0]
|
149 |
return issue
|
150 |
|
151 |
iface = gr.Interface(
|