bizvideoschool commited on
Commit
94ea6d2
1 Parent(s): 04d70c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import streamlit as st
2
  import openai
3
  import pdfkit
4
- import os
5
 
6
  # Access the OpenAI API key from Hugging Face Spaces secrets
7
  openai.api_key = st.secrets["OPENAI_API_KEY"]
@@ -54,7 +53,8 @@ if st.button('Generate My Video Marketing Plan'):
54
 
55
  # Convert the marketing plan to a PDF and provide a download button
56
  if marketing_plan:
57
- html = f"<html><body><h2>Your Customized Video Marketing Plan</h2><p>{marketing_plan.replace('\n', '<br>')}</p></body></html>"
 
58
  pdf = pdfkit.from_string(html, False)
59
 
60
  st.download_button(
 
1
  import streamlit as st
2
  import openai
3
  import pdfkit
 
4
 
5
  # Access the OpenAI API key from Hugging Face Spaces secrets
6
  openai.api_key = st.secrets["OPENAI_API_KEY"]
 
53
 
54
  # Convert the marketing plan to a PDF and provide a download button
55
  if marketing_plan:
56
+ formatted_plan = marketing_plan.replace('\n', '<br>')
57
+ html = f"<html><body><h2>Your Customized Video Marketing Plan</h2><p>{formatted_plan}</p></body></html>"
58
  pdf = pdfkit.from_string(html, False)
59
 
60
  st.download_button(