Jofthomas HF staff commited on
Commit
3b56d11
1 Parent(s): 37719d5

Update TextGen/router.py

Browse files
Files changed (1) hide show
  1. TextGen/router.py +4 -3
TextGen/router.py CHANGED
@@ -308,12 +308,13 @@ def generate_voice_eleven(message: VoiceMessage = None):
308
  #
309
  # return StreamingResponse(audio_stream(),media_type="audio/mpeg")
310
  @app.get("/generate_song")
311
- async def generate_song():
312
- text="""You are a bard in a video game singing the tales of a little girl in red hood."""
313
-
314
  song_lyrics=generate_lyrics({
315
  "prompt": f"{text}",
316
  })
 
317
  data = custom_generate_audio({
318
  "prompt": song_lyrics['text'],
319
  "tags": "male bard",
 
308
  #
309
  # return StreamingResponse(audio_stream(),media_type="audio/mpeg")
310
  @app.get("/generate_song")
311
+ async def generate_song(request:SongRequest):
312
+ text=f"""You are a bard in a video game singing the tales of a little girl in red hood. {request.prompt}"""
313
+ print(text)
314
  song_lyrics=generate_lyrics({
315
  "prompt": f"{text}",
316
  })
317
+ print(song_lyrics['text'])
318
  data = custom_generate_audio({
319
  "prompt": song_lyrics['text'],
320
  "tags": "male bard",