Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ model = AutoModelForCausalLM.from_pretrained("Lucid-research/lucentcode-1-py")
|
|
| 8 |
|
| 9 |
def generate_text(prompt):
|
| 10 |
inputs = tokenizer(prompt, return_tensors="pt")
|
| 11 |
-
outputs = model.generate(**inputs, max_length=
|
| 12 |
return tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 13 |
|
| 14 |
iface = gr.Interface(fn=generate_text, inputs="text", outputs="text")
|
|
|
|
| 8 |
|
| 9 |
def generate_text(prompt):
|
| 10 |
inputs = tokenizer(prompt, return_tensors="pt")
|
| 11 |
+
outputs = model.generate(**inputs, max_length=1000)
|
| 12 |
return tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 13 |
|
| 14 |
iface = gr.Interface(fn=generate_text, inputs="text", outputs="text")
|