-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Screen recording #10832
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
Screen recording #10832
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/76dd5d48068f7c286807754c2bc59fb7f1ee5444/gradio-5.30.0-py3-none-any.whlInstall Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@76dd5d48068f7c286807754c2bc59fb7f1ee5444#subdirectory=client/python"Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/76dd5d48068f7c286807754c2bc59fb7f1ee5444/gradio-client-1.15.0.tgzUse Lite from this PR <script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/76dd5d48068f7c286807754c2bc59fb7f1ee5444/dist/lite.js""></script> |
🦄 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.
|
|
Hi @dawoodkhan82! It works wonderfully for me with this first app, but I found it didn't work quite as well with the second app: import gradio as gr
def greet(name, intensity):
return "Hello, " + name + "!" * int(intensity)
demo = gr.Interface(
fn=greet,
inputs=["text", "slider"],
outputs=["text"],
)
demo.launch()import gradio as gr
python_code = """
def fib(n):
if n <= 0:
return 0
elif n == 1:
return 1
else:
return fib(n-1) + fib(n-2)
"""
js_code = """
function fib(n) {
if (n <= 0) return 0;
if (n === 1) return 1;
return fib(n - 1) + fib(n - 2);
}
"""
def chat(message, history):
if "python" in message.lower():
return "Type Python or JavaScript to see the code.", gr.Code(language="python", value=python_code)
elif "javascript" in message.lower():
return "Type Python or JavaScript to see the code.", gr.Code(language="javascript", value=js_code)
else:
return "Please ask about Python or JavaScript.", None
with gr.Blocks() as demo:
code = gr.Code(render=False)
with gr.Row():
with gr.Column():
gr.Markdown("<center><h1>Write Python or JavaScript</h1></center>")
gr.ChatInterface(
chat,
examples=["Python", "JavaScript"],
additional_outputs=[code],
type="messages"
)
with gr.Column():
gr.Markdown("<center><h1>Code Artifacts</h1></center>")
code.render()
demo.launch()Here are the first and second videos attached: |
|
I'm not able to play the generated videos on my end. Here's mine for reference: gradio-screen-recording-2025-03-24T16-57-24.webmAre you able to play this @dawoodkhan82? |
e3150f3 to
dfb55ed
Compare
|
Hmm sorry I just tested this @dawoodkhan82 and the zooms are off. Here's the deployed Space I tested: https://gradio-pr-deploys-pr-10832-all-demos.hf.space/demo/audio_debugger/?__theme=dark and here's the video it produced: gradio-screen-recording-2025-05-14T02-10-31.mp4 |
|
Ah okay it looks like the issue is because I selected an example. But that's a common enough use case that we should definitely support it. If I select a file, it works fine: gradio-screen-recording-2025-05-14T02-18-51.mp4Although a couple of things:
|
|
@abidlabs from our discussion: moved "Screen Studio" to settings. screen_recording.mov |
|
Nice looks good! I also liked the idea of having a checkboxes there to enable/disable zooming and enable/disable trimming |
Oh that's neat! |
|
Some minor points noted above, once those are addressed should be ready to merge! |
abidlabs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @dawoodkhan82 thanks for putting this together! Let's get it out and get feedback from the community


Description
Adds a screen recording feature. Record button is in footer.
Edits the video to trim the prediction time.
Closes: #(issue)
🎯 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.
Testing and Formatting Your Code
PRs will only be merged if tests pass on CI. We recommend at least running the backend tests locally, please set up your Gradio environment locally and run the backed tests:
bash scripts/run_backend_tests.shPlease run these bash scripts to automatically format your code:
bash scripts/format_backend.sh, and (if you made any changes to non-Python files)bash scripts/format_frontend.sh