Skip to content

fix( #422 ): Missing: How to Access Inputs During Stream Processing#423

Merged
freddyaboulton merged 1 commit intogradio-app:mainfrom
SanthoshSiddegowda:#422
Jan 12, 2026
Merged

fix( #422 ): Missing: How to Access Inputs During Stream Processing#423
freddyaboulton merged 1 commit intogradio-app:mainfrom
SanthoshSiddegowda:#422

Conversation

@SanthoshSiddegowda
Copy link
Contributor

Location

docs/userguide/api.md lines 65-85

Problem

The docs show how to set inputs via set_input(), but don't explain how to access them in receive() and emit() methods.

What's Missing

  • How to access self.latest_args in receive() and emit() methods
  • Explanation that latest_args[0] is metadata, actual args start at [1]

Suggested Fix

Add example showing how to access inputs in stream processing:

def receive(self, frame):
    conf_threshold = self.latest_args[1]  # [0] is metadata
    # Use conf_threshold

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much @SanthoshSiddegowda !

@freddyaboulton freddyaboulton merged commit 35153a1 into gradio-app:main Jan 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants