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
Move markdown & latex processing to the frontend for the gr.Markdown and gr.DataFrame components #5268
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-builds.s3.amazonaws.com/3ae854f789f5d2075b447cb6d59e22975058a292/gradio-3.40.1-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@3ae854f789f5d2075b447cb6d59e22975058a292#subdirectory=client/python" |
🦄 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.
|
Fighting an issue with the frontend build step, which was working until just recently (seems flaky?) |
We use |
Tested both |
That is true -- however, the previous behavior of |
Fixed up the backend tests -- also I've recently had to make a lot of changes manually to the XRAY_CONFIG e.g. every time I add a new parameter to a component. I wrote a script Of course, it should be used with caution since we should only override the test config if we're sure that there aren't any accidental changes to the config generation. But it can help avoid tedious manual work particularly for the component cleanup. cc @dawoodkhan82 @hannahblair for visibility |
Thanks for the review @dawoodkhan82! Merging |
Moves markdown and latex processing to the frontend for the
gr.Markdown
andgr.DataFrame
components. This has several advantages:gradio
python package 🥳markdown_it
(see screenshots below)gr.Chatbot
)It should be noted that this increases the javascript bundle size for these two components.
Screenshots (before):
Screenshots (after):
Closes: #4523
Also added:
latex_delimiters
parameter togr.Markdown()
andgr.DataFrame
for control over whether to parse LaTeXThanks @dawoodkhan82 for the pointers!