Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,9 @@ def generate_text(usertitle, content, temperature, max_length, N=3):
|
|
| 36 |
with torch.no_grad():
|
| 37 |
outputs = rm_model(**inputs)
|
| 38 |
logits = outputs.logits
|
| 39 |
-
|
|
|
|
|
|
|
| 40 |
|
| 41 |
best_sequence = max(decoded_sequences, key=score)
|
| 42 |
|
|
|
|
| 36 |
with torch.no_grad():
|
| 37 |
outputs = rm_model(**inputs)
|
| 38 |
logits = outputs.logits
|
| 39 |
+
print("Logits shape:", logits.shape)
|
| 40 |
+
print("Logits contents:", logits)
|
| 41 |
+
return logits[0]#[0].item()
|
| 42 |
|
| 43 |
best_sequence = max(decoded_sequences, key=score)
|
| 44 |
|