Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -74,13 +74,7 @@ if __name__ == "__main__":
|
|
74 |
value=" ", # should be set to " " when plugged into a real API
|
75 |
)
|
76 |
tokens = gr.Slider(1, 64, value=32, step=1, label="Tokens to generate")
|
77 |
-
|
78 |
-
sampling2 = gr.Radio(
|
79 |
-
["Sample 1", "Sample 2", "Sample 3", "Sample 4", "Sample 5"],
|
80 |
-
value="Sample 1",
|
81 |
-
label="Sample other generations (only work in 'Sample' mode)",
|
82 |
-
type="index",
|
83 |
-
)
|
84 |
|
85 |
with gr.Row():
|
86 |
submit = gr.Button("Submit")
|
@@ -98,11 +92,11 @@ if __name__ == "__main__":
|
|
98 |
js=js_load_script,
|
99 |
)
|
100 |
with gr.Row():
|
101 |
-
gr.Examples(examples=examples, inputs=[text, tokens
|
102 |
|
103 |
submit.click(
|
104 |
inference,
|
105 |
-
inputs=[text, tokens, "Greedy",
|
106 |
outputs=[display_out, text_out, text_error],
|
107 |
)
|
108 |
|
|
|
74 |
value=" ", # should be set to " " when plugged into a real API
|
75 |
)
|
76 |
tokens = gr.Slider(1, 64, value=32, step=1, label="Tokens to generate")
|
77 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
with gr.Row():
|
80 |
submit = gr.Button("Submit")
|
|
|
92 |
js=js_load_script,
|
93 |
)
|
94 |
with gr.Row():
|
95 |
+
gr.Examples(examples=examples, inputs=[text, tokens ])
|
96 |
|
97 |
submit.click(
|
98 |
inference,
|
99 |
+
inputs=[text, tokens, "Greedy", "Sample 1"],
|
100 |
outputs=[display_out, text_out, text_error],
|
101 |
)
|
102 |
|