Spaces:
Paused
Paused
Younes Belkada
commited on
Commit
•
fed3237
1
Parent(s):
7012779
Update app.py
Browse files
app.py
CHANGED
@@ -31,5 +31,18 @@ def inference(text, seq_length=1):
|
|
31 |
input_ids = next_token_ix.view(1, 1)
|
32 |
return tokenizer.decode(final_tokens[0], skip_special_tokens=False)
|
33 |
|
34 |
-
iface = gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
iface.launch()
|
|
|
31 |
input_ids = next_token_ix.view(1, 1)
|
32 |
return tokenizer.decode(final_tokens[0], skip_special_tokens=False)
|
33 |
|
34 |
+
iface = gr.Interface(
|
35 |
+
fn=inference,
|
36 |
+
inputs=[
|
37 |
+
gr.Textbox(lines=10, label="Input text"),
|
38 |
+
gr.inputs.Slider(
|
39 |
+
minimum=0,
|
40 |
+
maximum=1000,
|
41 |
+
step=1,
|
42 |
+
default=42,
|
43 |
+
label="Sequence length for generation"
|
44 |
+
)
|
45 |
+
],
|
46 |
+
outputs="text"
|
47 |
+
)
|
48 |
iface.launch()
|