Update TextGen/router.py
Browse files- TextGen/router.py +10 -10
TextGen/router.py
CHANGED
@@ -10,7 +10,7 @@ from langchain.chains import LLMChain
|
|
10 |
from langchain.prompts import PromptTemplate
|
11 |
from TextGen.suno import custom_generate_audio, get_audio_information,generate_lyrics
|
12 |
from TextGen.gemini import generate_story,place_objects,generate_map_markdown
|
13 |
-
from TextGen.diffusion import generate_image
|
14 |
#from coqui import predict
|
15 |
from langchain_google_genai import (
|
16 |
ChatGoogleGenerativeAI,
|
@@ -326,15 +326,15 @@ async def generate_song(request:SongRequest):
|
|
326 |
infos=get_audio_information(f"{data[0]['id']},{data[1]['id']}")
|
327 |
return infos
|
328 |
|
329 |
-
|
330 |
-
def Imagen(image:ImageGen=None):
|
331 |
-
pil_image =generate_image(image.prompt)
|
332 |
-
|
333 |
|
334 |
# Convert the PIL Image to bytes
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
#
|
339 |
-
|
340 |
-
|
|
|
10 |
from langchain.prompts import PromptTemplate
|
11 |
from TextGen.suno import custom_generate_audio, get_audio_information,generate_lyrics
|
12 |
from TextGen.gemini import generate_story,place_objects,generate_map_markdown
|
13 |
+
#from TextGen.diffusion import generate_image
|
14 |
#from coqui import predict
|
15 |
from langchain_google_genai import (
|
16 |
ChatGoogleGenerativeAI,
|
|
|
326 |
infos=get_audio_information(f"{data[0]['id']},{data[1]['id']}")
|
327 |
return infos
|
328 |
|
329 |
+
#@app.post('/generate_image')
|
330 |
+
#def Imagen(image:ImageGen=None):
|
331 |
+
# pil_image =generate_image(image.prompt)
|
332 |
+
#
|
333 |
|
334 |
# Convert the PIL Image to bytes
|
335 |
+
# img_byte_arr = BytesIO()
|
336 |
+
# pil_image.save(img_byte_arr, format='PNG')
|
337 |
+
# img_byte_arr = img_byte_arr.getvalue()
|
338 |
#
|
339 |
+
# # Return the image as a PNG response
|
340 |
+
# return Response(content=img_byte_arr, media_type="image/png")
|