Spaces:
Sleeping
Sleeping
Fixed parenthesis issue
Browse files
app.py
CHANGED
@@ -18,4 +18,15 @@ with gr.Blocks() as demo:
|
|
18 |
gr.Markdown("Generate text using the Phi-2 PEFT model.")
|
19 |
with gr.Row():
|
20 |
prompt_input = gr.Textbox(label="Input Prompt", placeholder="Enter a prompt here...")
|
21 |
-
max_tokens_input = gr.Slider(label="Max Tokens", minimum=10, maximum=200, value=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
gr.Markdown("Generate text using the Phi-2 PEFT model.")
|
19 |
with gr.Row():
|
20 |
prompt_input = gr.Textbox(label="Input Prompt", placeholder="Enter a prompt here...")
|
21 |
+
max_tokens_input = gr.Slider(label="Max Tokens", minimum=10, maximum=200, value=100, step=10)
|
22 |
+
generate_button = gr.Button("Generate")
|
23 |
+
output_text = gr.Textbox(label="Generated Text", placeholder="Generated text will appear here.")
|
24 |
+
|
25 |
+
generate_button.click(
|
26 |
+
fn=generate_text,
|
27 |
+
inputs=[prompt_input, max_tokens_input],
|
28 |
+
outputs=output_text
|
29 |
+
)
|
30 |
+
|
31 |
+
# Launch the app
|
32 |
+
demo.launch()
|