Spaces:
Runtime error
Runtime error
Commit
·
1f156ff
1
Parent(s):
c5c67e6
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ answer = decode(model.generate(context, max_new_tokens=1000)[0].tolist())
|
|
11 |
def display(number):
|
12 |
return answer[:number+1]
|
13 |
|
14 |
-
input_slider = gr.
|
15 |
-
output_text = gr.
|
16 |
-
gr.Interface(fn=display, inputs=input_slider, outputs=output_text)
|
|
|
|
11 |
def display(number):
|
12 |
return answer[:number+1]
|
13 |
|
14 |
+
input_slider = gr.Slider(minimum=500, maximum=1000, default=500, label="Select the maxium number of tokens/words:")
|
15 |
+
output_text = gr.Textbox()
|
16 |
+
demo = gr.Interface(fn=display, inputs=input_slider, outputs=output_text)
|
17 |
+
demo.launch()
|