Spaces:
Runtime error
Runtime error
Luis Oala
commited on
Commit
·
a55ed28
1
Parent(s):
c67f8c0
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def inference(text, seed):
|
|
30 |
outtext = io1(text)
|
31 |
"""
|
32 |
#outtext = io2(text)
|
33 |
-
set_seed(seed)
|
34 |
outtext = generator(text, max_length=100, num_return_sequences=1)
|
35 |
return outtext
|
36 |
|
@@ -38,7 +38,7 @@ def inference(text, seed):
|
|
38 |
|
39 |
gr.Interface(
|
40 |
inference,
|
41 |
-
[gr.inputs.Textbox(label="input", placeholder="trustworthy artificial intelligence"), gr.inputs.Number(
|
42 |
#,gr.inputs.Dropdown(choices=["distilgpt2","gpt2-medium","gpt2-large","gpt2-xl"], type="value", default="gpt2-medium", label="model")],
|
43 |
gr.outputs.Textbox(label="gpt-2 proposal"),
|
44 |
#title=title,
|
|
|
30 |
outtext = io1(text)
|
31 |
"""
|
32 |
#outtext = io2(text)
|
33 |
+
set_seed(int(seed))
|
34 |
outtext = generator(text, max_length=100, num_return_sequences=1)
|
35 |
return outtext
|
36 |
|
|
|
38 |
|
39 |
gr.Interface(
|
40 |
inference,
|
41 |
+
[gr.inputs.Textbox(label="input", placeholder="trustworthy artificial intelligence"), gr.inputs.Number(label="seed")],
|
42 |
#,gr.inputs.Dropdown(choices=["distilgpt2","gpt2-medium","gpt2-large","gpt2-xl"], type="value", default="gpt2-medium", label="model")],
|
43 |
gr.outputs.Textbox(label="gpt-2 proposal"),
|
44 |
#title=title,
|