Spaces:
Sleeping
Sleeping
lorenzoscottb
commited on
Commit
β’
a7b3d15
1
Parent(s):
8e3e8da
Update app.py
Browse files
app.py
CHANGED
@@ -74,20 +74,18 @@ interface_words = gr.Interface(
|
|
74 |
# )
|
75 |
# interface_model_L.load("models/DReAMy-lib/xlm-roberta-large-DreamBank-emotion-presence")
|
76 |
|
77 |
-
pipe_S = pipeline("
|
78 |
def predict(text):
|
79 |
t = pipe_S(text)
|
80 |
-
print(t)
|
81 |
return t
|
82 |
interface_model_S = gr.Interface(
|
83 |
fn=pipe_S,
|
84 |
inputs='text',
|
85 |
-
|
86 |
title="SA Base English-Only",
|
87 |
description=description_S,
|
88 |
examples = ["I was followed by the blue monster but was not scared. I was calm and relaxed."],
|
89 |
cache_examples=True,
|
90 |
-
|
91 |
)
|
92 |
|
93 |
# interface_model_G = gr.Interface.load(
|
|
|
74 |
# )
|
75 |
# interface_model_L.load("models/DReAMy-lib/xlm-roberta-large-DreamBank-emotion-presence")
|
76 |
|
77 |
+
pipe_S = pipeline("text-classification", model="DReAMy-lib/bert-base-cased-DreamBank-emotion-presence")
|
78 |
def predict(text):
|
79 |
t = pipe_S(text)
|
|
|
80 |
return t
|
81 |
interface_model_S = gr.Interface(
|
82 |
fn=pipe_S,
|
83 |
inputs='text',
|
84 |
+
outputs='label',
|
85 |
title="SA Base English-Only",
|
86 |
description=description_S,
|
87 |
examples = ["I was followed by the blue monster but was not scared. I was calm and relaxed."],
|
88 |
cache_examples=True,
|
|
|
89 |
)
|
90 |
|
91 |
# interface_model_G = gr.Interface.load(
|