HuggingFace MCP - Image Generation samples #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new feature for generating AI images using the Hugging Face MCP Server in C#. It includes updates to the repository's structure, documentation, and the addition of sample solutions, including console applications and a .NET Aspire Blazor WebApp. Additionally, it incorporates service defaults for resilience, health checks, and OpenTelemetry instrumentation. Below is a breakdown of the most important changes:
Documentation Updates:
Sample Solutions:
MCP-01-HuggingFace
andMCP-02-HuggingFace-Ollama
) demonstrate connecting to the Hugging Face MCP Server, listing tools, and generating images from text prompts using cloud-hosted or local models.HFMCP.GenImage.Web
) for AI-powered image generation with a user-friendly interface and extensible architecture. Includes setup instructions and supported models.Infrastructure Enhancements:
HFMCP.GenImage.ServiceDefaults
) to provide common services such as resilience, health checks, and OpenTelemetry instrumentation for all service projects in the solution. [1] [2]HFMCP.GenImage.ApiService
) with OpenAPI support, health checks, and default endpoints for interacting with AI models. [1] [2] [3]Application Host:
HFMCP.GenImage.AppHost
) to manage the solution's components, including the API service and web frontend. Configured health checks and service references for seamless integration. [1] [2]Web Frontend Enhancements:
App.razor
andMainLayout.razor
, to structure the user interface and provide navigation. [1] [2]