Балаганский Никита Николаевич
commited on
Commit
•
d2c745e
1
Parent(s):
124c8d3
add logging
Browse files
app.py
CHANGED
@@ -65,6 +65,7 @@ def inference(lm_model_name: str, cls_model_name: str, prompt: str, fp16: bool =
|
|
65 |
else:
|
66 |
autocast = torch.cuda.amp.autocast
|
67 |
with autocast(fp16):
|
|
|
68 |
sequences, tokens = generator.sample_sequences(
|
69 |
num_samples=1,
|
70 |
input_prompt=prompt,
|
@@ -74,6 +75,7 @@ def inference(lm_model_name: str, cls_model_name: str, prompt: str, fp16: bool =
|
|
74 |
entropy=3.2,
|
75 |
**kwargs
|
76 |
)
|
|
|
77 |
return sequences[0]
|
78 |
|
79 |
|
|
|
65 |
else:
|
66 |
autocast = torch.cuda.amp.autocast
|
67 |
with autocast(fp16):
|
68 |
+
print(f"Generating for prompt: {prompt}")
|
69 |
sequences, tokens = generator.sample_sequences(
|
70 |
num_samples=1,
|
71 |
input_prompt=prompt,
|
|
|
75 |
entropy=3.2,
|
76 |
**kwargs
|
77 |
)
|
78 |
+
print(f"Output for prompt: {sequences}")
|
79 |
return sequences[0]
|
80 |
|
81 |
|