Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -55,10 +55,12 @@ def generate_tokens(text):
|
|
55 |
input_ids = input["input_ids"].tolist()[0]
|
56 |
output_ids = output.tolist()[0]
|
57 |
|
|
|
|
|
58 |
input_tokens_str = tokenizer.convert_ids_to_tokens(input_ids)
|
59 |
#output_tokens_str = tokenizer.convert_tokens_to_ids(output_ids)
|
60 |
|
61 |
-
return " ".join(input_tokens_str), " ".join(
|
62 |
|
63 |
"""
|
64 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
|
|
55 |
input_ids = input["input_ids"].tolist()[0]
|
56 |
output_ids = output.tolist()[0]
|
57 |
|
58 |
+
formatted_output = [format(x, 'd') for x in output_ids]
|
59 |
+
|
60 |
input_tokens_str = tokenizer.convert_ids_to_tokens(input_ids)
|
61 |
#output_tokens_str = tokenizer.convert_tokens_to_ids(output_ids)
|
62 |
|
63 |
+
return " ".join(input_tokens_str), " ".join(formatted_output)
|
64 |
|
65 |
"""
|
66 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|