legofan94 commited on
Commit
5c56efb
1 Parent(s): 190919b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -10
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="Generate a conversation between two women gently roasting the uploaded image in less than 100 words. Please abide by these guidelines. \
45
- 1. Begin conversation turns with the prefix 'Host: 1' and 'Host: 2'. For example, Host 1: Hello how are you? Host 2: I'm good and yourself? Host 3: Thanks for asking! \
46
- 2. Use humor, irony, and sarcasm to gently roast the person depicted in the photo, based on their perceived jobs, interest, and appearance. \
47
- 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. \
48
- 4. Conversation turns should be short and on topic. \
49
- 5. Incorporate frequent backchanneling throughout the conversation. For example \
50
- You're kidding me \
51
- Weird \
52
- No kidding \
53
- You can say that again!",
 
 
 
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(