Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ def generate_tokens(text):
|
|
56 |
output_ids = output.tolist()[0]
|
57 |
|
58 |
input_tokens_str = tokenizer.convert_ids_to_tokens(input_ids)
|
59 |
-
output_tokens_str =
|
60 |
|
61 |
return " ".join(input_tokens_str), " ".join(output_tokens_str)
|
62 |
|
@@ -81,7 +81,7 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
|
|
81 |
#)
|
82 |
|
83 |
with gr.Blocks() as demo:
|
84 |
-
with gr.
|
85 |
gr.ChatInterface(
|
86 |
respond,
|
87 |
additional_inputs=[
|
@@ -98,7 +98,7 @@ with gr.Blocks() as demo:
|
|
98 |
],
|
99 |
)
|
100 |
|
101 |
-
with gr.
|
102 |
input_text = gr.Textbox(label="Input text")
|
103 |
input_tokens = gr.Textbox(label="Input tokens")
|
104 |
output_tokens = gr.Textbox(label="Output tokens")
|
|
|
56 |
output_ids = output.tolist()[0]
|
57 |
|
58 |
input_tokens_str = tokenizer.convert_ids_to_tokens(input_ids)
|
59 |
+
output_tokens_str = output_ids
|
60 |
|
61 |
return " ".join(input_tokens_str), " ".join(output_tokens_str)
|
62 |
|
|
|
81 |
#)
|
82 |
|
83 |
with gr.Blocks() as demo:
|
84 |
+
with gr.Column():
|
85 |
gr.ChatInterface(
|
86 |
respond,
|
87 |
additional_inputs=[
|
|
|
98 |
],
|
99 |
)
|
100 |
|
101 |
+
with gr.Row():
|
102 |
input_text = gr.Textbox(label="Input text")
|
103 |
input_tokens = gr.Textbox(label="Input tokens")
|
104 |
output_tokens = gr.Textbox(label="Output tokens")
|