Spaces:
PlayHT
/
Running on CPU Upgrade

legofan94 commited on
Commit
216eafd
·
verified ·
1 Parent(s): 7d852fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -41,8 +41,8 @@ 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 complimenting the uploaded image in less than 150 words. Please abide by these guidelines. \
45
- 1. Begin conversation turns with the prefix Host: 1 and Host: 2 \
46
  2. Use humor, irony, and sarcasm to entertain \
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.",
48
  )
@@ -65,8 +65,10 @@ def text_to_speech(text):
65
  "voice2": "s3://voice-cloning-zero-shot/fdb74aec-ede9-45f8-ad87-71cb45f01816/original/manifest.json",
66
  "turnPrefix": "Host 1:",
67
  "turnPrefix2": "Host 2:",
 
 
68
  "output_format": "mp3",
69
- "text": text,
70
  }
71
  headers = {
72
  "content-type": "application/json",
 
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 flirtatiously complimenting the uploaded image in less than 150 words. Please abide by these guidelines. \
45
+ 1. Begin each conversation turn alternating between the prefixes 'Host: 1' and 'Host: 2' \
46
  2. Use humor, irony, and sarcasm to entertain \
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.",
48
  )
 
65
  "voice2": "s3://voice-cloning-zero-shot/fdb74aec-ede9-45f8-ad87-71cb45f01816/original/manifest.json",
66
  "turnPrefix": "Host 1:",
67
  "turnPrefix2": "Host 2:",
68
+ "prompt": null,
69
+ "prompt2": null,
70
  "output_format": "mp3",
71
+
72
  }
73
  headers = {
74
  "content-type": "application/json",