mrbeliever commited on
Commit
79a3f23
1 Parent(s): 6ec4fc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -40,11 +40,11 @@ def generate(prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition
40
  yield output
41
  return output
42
 
43
- iface = gr.Interface(
44
- fn=generate,
45
- inputs=gr.Textbox(placeholder="Enter your prompt here...", lines=2, max_lines=2, label="Prompt"),
46
- outputs=gr.Textbox(label="Output", interactive=True, lines=10),
47
- live=True,
48
- )
49
-
50
- iface.launch()
 
40
  yield output
41
  return output
42
 
43
+ with gr.Blocks() as demo:
44
+ input_text = gr.Textbox(placeholder="Enter your prompt here...", lines=2, max_lines=2, label="Prompt")
45
+ output_text = gr.Textbox(label="Output", interactive=True, lines=10)
46
+ submit_button = gr.Button("Generate")
47
+
48
+ submit_button.click(fn=generate, inputs=input_text, outputs=output_text)
49
+
50
+ demo.launch()