-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add fullscreen mode to gr.Chatbot
#9357
Conversation
gr.Chatbot
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/6bda21eb00b4768e60eeead1e67edb96fd541b85/gradio-4.44.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@6bda21eb00b4768e60eeead1e67edb96fd541b85#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/6bda21eb00b4768e60eeead1e67edb96fd541b85/gradio-client-1.6.0-beta.1.tgz |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
I tried to run this, but it didn't seem to work. import gradio as gr
def fn(message, history):
return message
demo = gr.ChatInterface(fn=fn, chatbot=gr.Chatbot(allow_fullscreen=True))
demo.launch()
Well, it's nice to be able to show the chat area in full screen, but I think this PR is a bit different from what I had in mind. |
Same, I didn't see any maximize/minimize icons when using Upon further reflection, I think this issue is a bit tricky to implement because we would need both the input textbox and the Chatbot component itself to be maximized to provide a useful DX on mobile. Is that possible? Perhaps this would need to be a parameter in @hysts I'm not sure what kind of UI you are thinking of -- the title of a chatbot could be arbitrarily connected to the chatbot so I'm not sure how we could maximize both. Is there a specific Space you have in mind? Perhaps we could look at how to improve the UI of that space specifically. Otherwise, we might just want to table this issue. |
I think we can go ahead and close this @hannahblair? |
Closing for now @hannahblair |
Description
Adds a full screen mode to chatbot using the
maximize
andminimize
icons, similar to what we have for gr.Gallery.Q: Should
True
orFalse
be the default?Another note, the original issue from @hysts was about changing the size of the chatbot area and making it resizeable, but @abidlabs suggested this full screen mode as an alternative. Do we think this is sufficient?
Closes: #8240
🎯 PRs Should Target Issues
Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.
Not adhering to this guideline will result in the PR being closed.
Tests
PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests:
bash scripts/run_all_tests.sh
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh