8000 Fix duplicate error message in GradioUI, test, and refactor by albertvillanova · Pull Request #1312 · huggingface/smolagents · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix duplicate error message in GradioUI, test, and refactor #1312

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

Merged
merged 8 commits into from
May 12, 2025

Conversation

albertvillanova
Copy link
Member
@albertvillanova albertvillanova commented May 9, 2025

Fix duplicate error message in GradioUI, test, and refactor.

Fix:

  • Before, error message was raised twice:
    # Display any errors
    if hasattr(step_log, "error") and step_log.error is not None:
    yield gr.ChatMessage(
    role="assistant",
    content=str(step_log.error),
    metadata={"title": "💥 Error", "status": "done"},
    )

    # Handle standalone errors but not from tool calls
    if hasattr(step_log, "error") and step_log.error is not None:
    yield gr.ChatMessage(
    role="assistant", content=str(step_log.error), metadata={"title": "💥 Error", "status": "done"}
    )

@albertvillanova albertvillanova changed the title Test GradioUI and refactor Test GradioUI, refactor and fix duplicate error message May 9, 2025
@albertvillanova albertvillanova changed the title Test GradioUI, refactor and fix duplicate error message Fix duplicate error message in GradioUI, test, and refactor May 12, 2025
Copy link
Collaborator
@aymeric-roucher aymeric-roucher left a comment

Choose a reason for hiding this comment

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

Thanks you @albertvillanova, great changes to make this GradioUI more robust!

@albertvillanova albertvillanova merged commit 95f021f into huggingface:main May 12, 2025
3 checks passed
@albertvillanova albertvillanova deleted the refactor-gradio-ui branch May 12, 2025 12:38
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
0