dominguezdaniel commited on
Commit
c45b9d6
1 Parent(s): 6107458

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ model = BartForConditionalGeneration.from_pretrained(model_name)
11
 
12
  def generate_tweet(label):
13
  # Generate a promotional tweet using a GPT-like model
14
- prompt = "Write a tweet about {label}:"
15
  inputs = tokenizer.encode(prompt, return_tensors="pt")
16
  outputs = model.generate(inputs, max_length=280, num_return_sequences=1)
17
  tweet = tokenizer.decode(outputs[0], skip_special_tokens=True)
 
11
 
12
  def generate_tweet(label):
13
  # Generate a promotional tweet using a GPT-like model
14
+ prompt = f"Write a tweet about {label}:"
15
  inputs = tokenizer.encode(prompt, return_tensors="pt")
16
  outputs = model.generate(inputs, max_length=280, num_return_sequences=1)
17
  tweet = tokenizer.decode(outputs[0], skip_special_tokens=True)