Spaces:
Sleeping
Sleeping
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("mistralai/Mistral-7B-Instruct-v0.1") # Example model, replace with your choice
|
9 |
+
model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
|
10 |
|
11 |
def generate_tweet(label):
|
12 |
# Generate a promotional tweet using a GPT-like model
|