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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -16,15 +16,14 @@ def generate_blogpost(topic):
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."
26
  )
27
 
28
- # Launch the Gradio interface
29
  if __name__ == "__main__":
30
- iface.launch()
 
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."
25
  )
26
 
27
+ # Launch the Gradio interface on a specified port
28
  if __name__ == "__main__":
29
+ iface.launch(server_port=7861) # You can change 7861 to any available port