derek0890 commited on
Commit
b0ca910
·
verified ·
1 Parent(s): 94e7018

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,8 +1,7 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- # Initialize the text generation pipeline with caching
5
- # Using a smaller model for better performance on free tier
6
  generator = pipeline('text-generation', model='gpt2')
7
 
8
  def generate_marketing_text(prompt, content_type, max_length=150, temperature=0.7):
@@ -46,5 +45,5 @@ demo = gr.Interface(
46
  description="Enter a topic and select content type to generate marketing content using AI."
47
  )
48
 
49
- # Launch the app with caching enabled for better performance
50
- demo.launch(cache_examples=True)
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ # Initialize the text generation pipeline
 
5
  generator = pipeline('text-generation', model='gpt2')
6
 
7
  def generate_marketing_text(prompt, content_type, max_length=150, temperature=0.7):
 
45
  description="Enter a topic and select content type to generate marketing content using AI."
46
  )
47
 
48
+ # Launch the app
49
+ demo.launch()