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

Dataframe in a webview breaks on Mac in another tab #6990

Closed
1 task done
Josef-Haupt opened this issue Jan 10, 2024 · 3 comments
Closed
1 task done

Dataframe in a webview breaks on Mac in another tab #6990

Josef-Haupt opened this issue Jan 10, 2024 · 3 comments
Labels
bug Something isn't working pending clarification

Comments

@Josef-Haupt
Copy link

Describe the bug

Hi! I am creating a GUI for an application which will be deployed cross plattform. To make it look like an app I'm using pywebview, which has been working fine one my machine (win10).
Currently I'm trying to make it work on Mac also.
The only problem is that the dataframe only works in the first tab (see example).
No matter what contents I try to serve, nothing will be displayed in the DF in the second tab.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr
import webview

with gr.Blocks(analytics_enabled=False) as demo:
    with gr.Tab("First"):
        gr.Matrix(headers=["h1", "h2"])
    with gr.Tab("Second"):
        gr.Matrix(headers=["h1", "h2"])

url = demo.queue(api_open=False).launch(prevent_thread_lock=True)[1]

webview.create_window("foo", url)
webview.start(private_mode=False)

Screenshot

Screenshot 2024-01-10 at 15 37 03 Screenshot 2024-01-10 at 15 38 57

Logs

No response

System Info

gradio: 4.13.0
gradio_client: 0.8.0
pywebview: 4.4.1
OS: Sonoma 14.2.1

Severity

Blocking usage of gradio

@Josef-Haupt Josef-Haupt added the bug Something isn't working label Jan 10, 2024
@abidlabs
Copy link
Member

Hi @Josef-Haupt I'm not super familiar with pywebview but if the Gradio app works correctly if you launch it like demo.launch() but not if you use pywebview, then it would suggest an issue with pywebview, correct? I would suggest opening an issue on https://github.com/r0x0r/pywebview

@Josef-Haupt
Copy link
Author

Pretty sure they are going to say the same thing.
Pywebview only uses the platforms native GUI, which is cocoa on macOS, to create the webview basically a Safari lite.

@abidlabs
Copy link
Member

Got it. I think this is outside the scope of Gradio right now, but we do have an open request to be able to build desktop apps with Gradio: #2257

Its a bit far down in the roadmap, but feel free to follow that issue for an officially-supported solution to build desktop apps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending clarification
Projects
None yet
Development

No branches or pull requests

2 participants