anamargarida commited on
Commit
fc259cf
·
verified ·
1 Parent(s): 4f844ad

Update app_6.py

Browse files
Files changed (1) hide show
  1. app_6.py +1 -15
app_6.py CHANGED
@@ -49,14 +49,7 @@ def load_model():
49
  # Load the model and tokenizer
50
  tokenizer, model = load_model()
51
 
52
- st.write("model_", model)
53
- st.write("model_weights", model.model)
54
- st.write("config", model.config)
55
- st.write("Signal_classifier_weights", model.signal_classifier.weight)
56
- st.write(model.model.embeddings.LayerNorm.weight)
57
- #st.write(model.model.encoder.layer.13.attention.self.value.weight)
58
- roberta_model = AutoModel.from_pretrained("roberta-large")
59
- st.write(roberta_model.embeddings.LayerNorm.weight)
60
 
61
  model.eval() # Set model to evaluation mode
62
  def extract_arguments(text, tokenizer, model, beam_search=True):
@@ -82,13 +75,6 @@ def extract_arguments(text, tokenizer, model, beam_search=True):
82
  start_signal_logits = outputs["start_sig_logits"][0]
83
  end_signal_logits = outputs["end_sig_logits"][0]
84
 
85
- #st.write("start_cause_logits", start_cause_logits)
86
- #st.write("end_cause_logits", end_cause_logits)
87
- #st.write("start_effect_logits", start_effect_logits)
88
- #st.write("end_effect_logits", end_effect_logits)
89
- #st.write("start_signal_logits", start_signal_logits)
90
- #st.write("end_signal_logits", end_signal_logits)
91
-
92
 
93
  # Set the first and last token logits to a very low value to ignore them
94
  start_cause_logits[0] = -1e-4
 
49
  # Load the model and tokenizer
50
  tokenizer, model = load_model()
51
 
52
+
 
 
 
 
 
 
 
53
 
54
  model.eval() # Set model to evaluation mode
55
  def extract_arguments(text, tokenizer, model, beam_search=True):
 
75
  start_signal_logits = outputs["start_sig_logits"][0]
76
  end_signal_logits = outputs["end_sig_logits"][0]
77
 
 
 
 
 
 
 
 
78
 
79
  # Set the first and last token logits to a very low value to ignore them
80
  start_cause_logits[0] = -1e-4