Comments (6)
You are right, sorry about that, seems like the issue is fixed as I just updated gradio.
from gradio.
Can you please provide a minimal code example that we can use to reproduce the issue above? See: https://stackoverflow.com/help/minimal-reproducible-example
from gradio.
Minimal code example to test this.
import random
import gradio as gr
with gr.Blocks() as demo:
gallery = gr.Gallery(value=
["https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Marc%2C_Franz_-_Blue_Horse_I_-_Google_Art_Project.jpg/449px-Marc%2C_Franz_-_Blue_Horse_I_-_Google_Art_Project.jpg",
"https://upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Anna_Bili%C5%84ska-Bohdanowiczowa_-_At_the_seaside_-_MP_203_-_National_Museum_in_Warsaw.jpg/479px-Anna_Bili%C5%84ska-Bohdanowiczowa_-_At_the_seaside_-_MP_203_-_National_Museum_in_Warsaw.jpg",
"https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Maison_devant_la_Sainte-Victoire_pr%C3%A8s_de_Gardanne%2C_par_Paul_C%C3%A9zanne%2C_Indianapolis_Museum_of_Art.jpg/741px-Maison_devant_la_Sainte-Victoire_pr%C3%A8s_de_Gardanne%2C_par_Paul_C%C3%A9zanne%2C_Indianapolis_Museum_of_Art.jpg",
"https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Adolph_Tidemand_%26_Hans_Gude_-_Bridal_Procession_on_the_Hardangerfjord_-_Google_Art_Project.jpg/839px-Adolph_Tidemand_%26_Hans_Gude_-_Bridal_Procession_on_the_Hardangerfjord_-_Google_Art_Project.jpg",
],
label="Generated images", show_label=False, columns=[4], allow_preview=False, selected_index=1)
selected_item = gr.Number(precision=0, label="selected gallery item")
def get_select_index(evt: gr.SelectData):
return evt.index
gallery.select(get_select_index, None, selected_item)
if __name__ == "__main__":
demo.launch()
As you can see, when the gallery has the parameter gr.Gallery(selected_index=1) for example then no matter which image I click on, the border highlight is still around the second image, even though the index change takes effect (except when I try to select the second image).
With the old version of Gradio the border changed fine to the correct image that was clicked on.
from gradio.
Hello. Just a gentle reminder on this. Is there a fix or a work around for this?
from gradio.
Hi @peeter2 havent had a chance to look at this yet, we’ll look into this as soon as we can!
from gradio.
Hi @peeter2 I took a look and I can't repro the issue you are describing. Are you sure you are running on the latest version of gradio
? You can try installing gradio from main
by following the instructions here: https://www.gradio.app/main/docs/interface
Screen.Recording.2024-04-21.at.12.03.26.AM.mov
from gradio.
Related Issues (20)
- Update doc on max_workers HOT 1
- streaming problems with `Chatbot` HOT 5
- [Custom Components] support custom components in gr.load HOT 2
- [Refactoring] Split the test cases in `test_components.py` into separate test files
- [Lite] Dedent file contents
- version 4.27 gradio title cannot be display in center HOT 2
- theme.css doesn't map to correct port. HOT 13
- docker gradio is not supported or working on CloudRun gcp but working fine locally. HOT 1
- Gradio APP Blocked for 400 seconds HOT 2
- Repeated "Invalid URI. Load of media resource failed." when recording audio in Firefox leads to browser crash
- 'favicon_path' does not work with fastapi and mount_gradio_app
- [Custom Components] run `gradio cc build` failed in 4.28.0 HOT 7
- Verify that the clients work on ZeroGPU HOT 1
- This request content must be served over HTTPS HOT 7
- Unable to preload CSS for https://gradio.s3-us-west-2.amazonaws.com/assets/index-b276ff4e.css HOT 1
- APP breaking error with ImageEditor - latest version HOT 2
- --share not work with paperspace HOT 22
- Multiple response to ChatInterface/Chatbot HOT 2
- Error when embedding gradio app within a fastapi app with web components HOT 3
- Can the tab be redirected by clicking the button? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradio.