lorenzoscottb commited on
Commit
ed333f5
β€’
1 Parent(s): 07afc73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -74,14 +74,20 @@ interface_words = gr.Interface(
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=predict,
83
  inputs='text',
84
- outputs=gr.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."],
 
74
  # )
75
  # interface_model_L.load("models/DReAMy-lib/xlm-roberta-large-DreamBank-emotion-presence")
76
 
77
+ pipe_S = pipeline(
78
+ "text-classification",
79
+ model="DReAMy-lib/bert-base-cased-DreamBank-emotion-presence",
80
+ max_length=300,
81
+ return_all_scores=True,
82
+ truncation="do_not_truncate",
83
+ )
84
  def predict(text):
85
  t = pipe_S(text)
86
  return t
87
  interface_model_S = gr.Interface(
88
  fn=predict,
89
  inputs='text',
90
+ outputs==gr.Label(),
91
  title="SA Base English-Only",
92
  description=description_S,
93
  examples = ["I was followed by the blue monster but was not scared. I was calm and relaxed."],