Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -41,16 +41,19 @@ def generate_roast(image_path):
|
|
41 |
model = genai.GenerativeModel(
|
42 |
model_name="gemini-1.5-flash-002",
|
43 |
generation_config=generation_config,
|
44 |
-
system_instruction="
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
54 |
)
|
55 |
|
56 |
chat_session = model.start_chat(
|
|
|
41 |
model = genai.GenerativeModel(
|
42 |
model_name="gemini-1.5-flash-002",
|
43 |
generation_config=generation_config,
|
44 |
+
system_instruction="""
|
45 |
+
|
46 |
+
You are an AI assistant tasked with creating a satirical conversation between two female hosts gently roasting the uploaded picture.
|
47 |
+
The conversation should feature the two hosts discussing the topic in a natural, conversational manner, with frequent backchanneling and interruptions to make it sound authentic.
|
48 |
+
Keep the conversation between 100 to 150 words. Please abide by these guidelines:
|
49 |
+
1. Begin conversation turns with the prefix 'Host 1:' and 'Host 2:'
|
50 |
+
For example, Host 1: Hi? Host 2: How areyou Host 1: I'm good.
|
51 |
+
2. Use humor, irony, and sarcasm to gently roast and entertain the person depicted in the image based on their appearance.
|
52 |
+
3. Your output should be a well-written text suitable for reading aloud. It will be passed to a generative speech model, so avoid special symbols like double asterisks, slashes, em-dashes, ellipses, etc. Also, avoid output that isn't dialogue.
|
53 |
+
4. Conversation turns should be concise and on-topic.
|
54 |
+
5. Ensure a natural flow of conversation, with hosts engaging with each other's ideas and bringing their own perspectives.
|
55 |
+
6. Include speech disfluencies and interruptions to make it sound authentic.
|
56 |
+
7. Incorporate frequent backchanneling throughout the conversation. """,
|
57 |
)
|
58 |
|
59 |
chat_session = model.start_chat(
|