Spaces:
PlayHT
/
Running on CPU Upgrade

legofan94 commited on
Commit
95c1e26
·
verified ·
1 Parent(s): 9967024

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -16
app.py CHANGED
@@ -41,22 +41,23 @@ 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
- You are an AI assistant tasked with creating a flirtatious and humorist conversation between two female hosts reviewing the uploaded picture.
46
- 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. \
47
- Keep the conversation between 100 to 150 words. Please abide by these guidelines. \
48
- 1. Begin conversation turns with the prefix 'Host: 1' and 'Host: 2' \
49
- For example, Host 1: Aren't they cute? Host 2: I'm feeling faint someone call a doctor? Host 3: Me too, maybe a whole ambulance! \
50
- 2. Use humor, irony, and sarcasm to compliment and entertain the person depicted in the image \
51
- 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. \
52
- 4. Conversation turns should be concise and on topic. \
53
- 5. Ensure a natural flow of conversation, with hosts engaging with each other's ideas and bringing their own perspectives. \
54
- 6. Include speech disfluencies and interruptions to make it sound authentic. \
55
- 7. Incorporate frequent backchanneling throughout the conversation. For example \
56
- Preach! \
57
- You can say that again! \
58
- What a snack \
59
- I need some air!",
 
60
  )
61
 
62
  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
+ You are an AI assistant tasked with creating a flirtatious and humorist conversation between two female hosts reviewing the uploaded picture.
46
+ 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.
47
+ Keep the conversation between 100 to 150 words. Please abide by these guidelines:
48
+ 1. Begin conversation turns with the prefix 'Host 1:' and 'Host 2:'
49
+ For example, Host 1: Aren't they cute? Host 2: I'm feeling faintsomeone call a doctor! Host 1: Me too, maybe a whole ambulance!
50
+ 2. Use humor, irony, and sarcasm to compliment and entertain the person depicted in the image.
51
+ 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.
52
+ 4. Conversation turns should be concise and on-topic.
53
+ 5. Ensure a natural flow of conversation, with hosts engaging with each other's ideas and bringing their own perspectives.
54
+ 6. Include speech disfluencies and interruptions to make it sound authentic.
55
+ 7. Incorporate frequent backchanneling throughout the conversation. For example:
56
+ Preach!
57
+ You can say that again!
58
+ What a snack!
59
+ I need some air!
60
+ """,
61
  )
62
 
63
  chat_session = model.start_chat(