Spaces:
Runtime error
Runtime error
Commit
·
87213b5
1
Parent(s):
3d95d76
more tokens
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def make_inference(person, location, grammar, level):
|
|
32 |
return_tensors='pt')
|
33 |
|
34 |
with torch.cuda.amp.autocast():
|
35 |
-
output_tokens = model.generate(**batch, max_new_tokens=
|
36 |
|
37 |
return tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|
38 |
|
@@ -48,7 +48,7 @@ if __name__ == "__main__":
|
|
48 |
gr.inputs.Textbox(lines=2, label="Someone's name"),
|
49 |
gr.inputs.Textbox(lines=2, label="A location they might visit"),
|
50 |
gr.inputs.Textbox(lines=2, label="A type of grammar to use"),
|
51 |
-
gr.inputs.Textbox(lines=2, label="The
|
52 |
|
53 |
],
|
54 |
gr.outputs.Textbox(label="Passage"),
|
|
|
32 |
return_tensors='pt')
|
33 |
|
34 |
with torch.cuda.amp.autocast():
|
35 |
+
output_tokens = model.generate(**batch, max_new_tokens=100)
|
36 |
|
37 |
return tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|
38 |
|
|
|
48 |
gr.inputs.Textbox(lines=2, label="Someone's name"),
|
49 |
gr.inputs.Textbox(lines=2, label="A location they might visit"),
|
50 |
gr.inputs.Textbox(lines=2, label="A type of grammar to use"),
|
51 |
+
gr.inputs.Textbox(lines=2, label="The level of English to use (beginner, intermediate, advanced))"),
|
52 |
|
53 |
],
|
54 |
gr.outputs.Textbox(label="Passage"),
|