Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
|
|
3 |
|
4 |
def coding(model, text, codetext):
|
5 |
classifier = pipeline("zero-shot-classification", model=model)
|
6 |
-
codelist = codetext.split('
|
7 |
output = classifier(text, codelist, multi_label=True)
|
8 |
return output
|
9 |
|
@@ -29,8 +29,8 @@ iface = gr.Interface(
|
|
29 |
value='感覺性格溫和,適合香港人,特別係亞洲人的肌膚,不足之處就是感覺很少有優惠,價錢都比較貴'
|
30 |
),
|
31 |
gr.Textbox(
|
32 |
-
label='Code list (
|
33 |
-
value='
|
34 |
)
|
35 |
],
|
36 |
outputs=[
|
|
|
3 |
|
4 |
def coding(model, text, codetext):
|
5 |
classifier = pipeline("zero-shot-classification", model=model)
|
6 |
+
codelist = codetext.split(';')
|
7 |
output = classifier(text, codelist, multi_label=True)
|
8 |
return output
|
9 |
|
|
|
29 |
value='感覺性格溫和,適合香港人,特別係亞洲人的肌膚,不足之處就是感覺很少有優惠,價錢都比較貴'
|
30 |
),
|
31 |
gr.Textbox(
|
32 |
+
label='Code list (colon-separated)',
|
33 |
+
value='非常好/很好/好滿意;價錢合理/實惠/不太貴/親民/價格適中/價格便宜/價錢大眾化;價錢貴/不合理/比日本台灣貴/可以再平d'
|
34 |
)
|
35 |
],
|
36 |
outputs=[
|