JDmayo commited on
Commit
0cc5563
·
verified ·
1 Parent(s): d774a92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -16,9 +16,10 @@ def generate_blogpost(topic):
16
  return generated_text
17
 
18
  # Define the Gradio interface
 
19
  iface = gr.Interface(
20
  fn=generate_blogpost,
21
- inputs=gr.inputs.Textbox(lines=2, placeholder="Enter blog topic here..."),
22
  outputs="text",
23
  title="Blog Post Generator",
24
  description="Generate a detailed blog post for a given topic using GPT-2."
@@ -26,4 +27,4 @@ iface = gr.Interface(
26
 
27
  # Launch the Gradio interface
28
  if __name__ == "__main__":
29
- iface.launch()
 
16
  return generated_text
17
 
18
  # Define the Gradio interface
19
+ # Use gr.Textbox instead of gr.inputs.Textbox
20
  iface = gr.Interface(
21
  fn=generate_blogpost,
22
+ inputs=gr.Textbox(lines=2, placeholder="Enter blog topic here..."), # Change here
23
  outputs="text",
24
  title="Blog Post Generator",
25
  description="Generate a detailed blog post for a given topic using GPT-2."
 
27
 
28
  # Launch the Gradio interface
29
  if __name__ == "__main__":
30
+ iface.launch()