Update app.py
Browse files
app.py
CHANGED
|
@@ -19,13 +19,10 @@ def generate_text(prompt):
|
|
| 19 |
return tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 20 |
|
| 21 |
# Create the Gradio interface
|
| 22 |
-
|
| 23 |
fn=generate_text,
|
| 24 |
inputs=gr.Textbox(label="Enter your prompt", placeholder="Start typing...", lines=5),
|
| 25 |
outputs="text",
|
| 26 |
title="OpenCoder 8B Instruct",
|
| 27 |
description="Generate text using the OpenCoder model. Input a prompt to generate responses.",
|
| 28 |
)
|
| 29 |
-
|
| 30 |
-
# Launch the Gradio app
|
| 31 |
-
iface.launch()
|
|
|
|
| 19 |
return tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 20 |
|
| 21 |
# Create the Gradio interface
|
| 22 |
+
gr.ChatInterface(
|
| 23 |
fn=generate_text,
|
| 24 |
inputs=gr.Textbox(label="Enter your prompt", placeholder="Start typing...", lines=5),
|
| 25 |
outputs="text",
|
| 26 |
title="OpenCoder 8B Instruct",
|
| 27 |
description="Generate text using the OpenCoder model. Input a prompt to generate responses.",
|
| 28 |
)
|
|
|
|
|
|
|
|
|