Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
|
|
| 5 |
classifier = pipeline("image-classification", model="google/vit-base-patch16-224")
|
| 6 |
|
| 7 |
# Initialize the tokenizer and model for the generative text (GPT-like model)
|
| 8 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 9 |
-
model = AutoModelForCausalLM.from_pretrained("
|
| 10 |
|
| 11 |
def generate_tweet(label):
|
| 12 |
# Generate a promotional tweet using a GPT-like model
|
|
|
|
| 5 |
classifier = pipeline("image-classification", model="google/vit-base-patch16-224")
|
| 6 |
|
| 7 |
# Initialize the tokenizer and model for the generative text (GPT-like model)
|
| 8 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/bart-large-cnn") # Example model, replace with your choice
|
| 9 |
+
model = AutoModelForCausalLM.from_pretrained("facebook/bart-large-cnn")
|
| 10 |
|
| 11 |
def generate_tweet(label):
|
| 12 |
# Generate a promotional tweet using a GPT-like model
|