Spaces:
Sleeping
Sleeping
Commit
·
26ab567
1
Parent(s):
4b74b3f
remove debugging code
Browse files
app.py
CHANGED
@@ -127,7 +127,6 @@ def generate_with_feedback(sent1, approx):
|
|
127 |
'sentence1_attention_mask': torch.ones_like(input_ids)
|
128 |
}
|
129 |
|
130 |
-
print('generating...')
|
131 |
pred, (pred_text, interpolations) = model.infer_with_feedback_BP(ling_disc, sem_emb, inputs, tokenizer)
|
132 |
|
133 |
interpolation = '-- ' + '\n-- '.join(interpolations)
|
@@ -147,9 +146,7 @@ def generate_random(sent1, count, approx):
|
|
147 |
success = False
|
148 |
patience = 0
|
149 |
while not success:
|
150 |
-
print(c, patience)
|
151 |
pred, interpolation = generate_with_feedback(sent1, approx)[:2]
|
152 |
-
print(pred)
|
153 |
if pred not in preds:
|
154 |
success = True
|
155 |
elif patience < 10:
|
|
|
127 |
'sentence1_attention_mask': torch.ones_like(input_ids)
|
128 |
}
|
129 |
|
|
|
130 |
pred, (pred_text, interpolations) = model.infer_with_feedback_BP(ling_disc, sem_emb, inputs, tokenizer)
|
131 |
|
132 |
interpolation = '-- ' + '\n-- '.join(interpolations)
|
|
|
146 |
success = False
|
147 |
patience = 0
|
148 |
while not success:
|
|
|
149 |
pred, interpolation = generate_with_feedback(sent1, approx)[:2]
|
|
|
150 |
if pred not in preds:
|
151 |
success = True
|
152 |
elif patience < 10:
|