You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just like the the Dalle Bot we also want to integrate Stable Diffusion for image generation techniques. Replicate provides an API through which we can do this.
Have a look at this demo here on how to use the API.
In the textbase/models.py you'll see a class for DallE which returns the URL of the generated image.
It appears on the UI something like this-
To make sure that this is rendered properly in the frontend, in the response inside main.py we will use the Image class as done in DallE
return {
"messages": [Image(url=bot_response)],
"state": state
}
Add a StableDiffusion class in the models.py and add the logic there.
On the same line, I guess replicate must give a URL for the image generated. We can use a similar approach in that as well.
Make sure to make another directory as textbase/examples/stable-diffusion after testing that things are working fine and also add the respective docs.
Requirement
Just like the the Dalle Bot we also want to integrate Stable Diffusion for image generation techniques. Replicate provides an API through which we can do this.
Have a look at this demo here on how to use the API.
In the
textbase/models.py
you'll see a class forDallE
which returns the URL of the generated image.It appears on the UI something like this-
To make sure that this is rendered properly in the frontend, in the response inside
main.py
we will use theImage
class as done in DallEAdd a
StableDiffusion
class in the models.py and add the logic there.On the same line, I guess
replicate
must give a URL for the image generated. We can use a similar approach in that as well.Make sure to make another directory as
textbase/examples/stable-diffusion
after testing that things are working fine and also add the respective docs.Refer to
docs.textbase.ai
for setting up the project locallyThe text was updated successfully, but these errors were encountered: