Spaces:
Sleeping
Sleeping
added avg logprobs
Browse files
app.py
CHANGED
@@ -80,7 +80,7 @@ if __name__ == "__main__":
|
|
80 |
break
|
81 |
highlighted_out.append((token.replace("▁", " "), this_label))
|
82 |
|
83 |
-
return highlighted_out
|
84 |
|
85 |
demo = gr.Blocks()
|
86 |
with demo:
|
@@ -120,7 +120,7 @@ if __name__ == "__main__":
|
|
120 |
|
121 |
avg_logprobs = gr.Textbox(value = torch.mean(transition_proba))
|
122 |
|
123 |
-
button.click(get_tokens_and_labels, inputs=prompt, outputs=[highlighted_text,
|
124 |
|
125 |
|
126 |
if __name__ == "__main__":
|
|
|
80 |
break
|
81 |
highlighted_out.append((token.replace("▁", " "), this_label))
|
82 |
|
83 |
+
return highlighted_out, transition_proba
|
84 |
|
85 |
demo = gr.Blocks()
|
86 |
with demo:
|
|
|
120 |
|
121 |
avg_logprobs = gr.Textbox(value = torch.mean(transition_proba))
|
122 |
|
123 |
+
button.click(get_tokens_and_labels, inputs=prompt, outputs=[highlighted_text, transition_proba])
|
124 |
|
125 |
|
126 |
if __name__ == "__main__":
|