Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed Gradio components in an app (React/Flask/Django etc) #28

Closed
codeghees opened this issue Jul 16, 2020 · 11 comments
Closed

Embed Gradio components in an app (React/Flask/Django etc) #28

codeghees opened this issue Jul 16, 2020 · 11 comments

Comments

@codeghees
Copy link

How can I embed the interface like you did in your website?

I want to create a gradio app within another web framework - React, Flask or Django
Can I package it in a docker container?

@aliabid94
Copy link
Collaborator

For now, the best way is to embed an iframe. Working on making this seamless as it is on the main site.

@aliabd
Copy link
Collaborator

aliabd commented Jul 16, 2020

Let's get some documentation for this when it's ready @aliabid94 :)

@codeghees
Copy link
Author

Yes please!
What are the limitations of an iframe though?

@aliabid94
Copy link
Collaborator

You should be able to do everything normally with an iframe, the main shortcoming of an iframe is that you'll have to set the width and height manually, and it wont resize and the inputs and outputs may change

@abidlabs abidlabs closed this as completed Aug 3, 2020
@maxhchen
Copy link

maxhchen commented May 9, 2021

Have there been any updates to this?

1 similar comment
@wj-Mcat
Copy link

wj-Mcat commented Aug 22, 2022

Have there been any updates to this?

@abidlabs
Copy link
Member

Yes, please take a look here: https://www.gradio.app/sharing_your_app/#embedding-hosted-spaces

@Demi1024
Copy link

Have there been any updates to this? How to get the height of iframe content and avoid scrollbars?
Looking forward to the answer, thanks a lot.

@abidlabs
Copy link
Member

abidlabs commented Aug 25, 2022

Did you try the suggestions here: https://gradio.app/sharing_your_app/#embedding-hosted-spaces

@Wuffle1125
Copy link

I am using an iframe to embed my gradio app, but how can I make communication between my parent app and gradio app?
https://stackoverflow.com/questions/9153445/how-to-communicate-between-iframe-and-the-parent-site
From this link, I tried to send message from parent website to this iframe (gradio app)
But I don't see any possible way to get that message in gradio.

@shimaaahmedd
Copy link

I need to embed private hugging face to iframe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants