Spaces
What are Spaces
Spaces is a platform for showcasing large model applications. Developers can build and display various AI applications in Spaces, including multi-model combinations, interactive visualizations, and more, providing a capability showcase platform for developers.
Supported Application Types
| Type | Description |
|---|---|
| Gradio | Interactive ML demo apps built with the Gradio framework |
| Streamlit | Data applications built with the Streamlit framework |
| Docker | Any web application deployed with a custom Docker image |
| Nginx | Static website hosting |
| MCP App | Tool services based on the Model Context Protocol |
Core Features
- Interactivity: Provides a web interface for users to interact with models.
- Easy Deployment: Users just upload code; the platform handles building, deploying, and hosting.
- Privacy Control: Supports public or private settings, suitable for enterprise or personal use.
- Version Management: Application code is Git-managed, supporting version rollbacks.
Quick Start (Gradio)
- Create a new Space on the platform, choosing the Gradio type.
- Clone the Space repository to your local machine:
git clone https://<platform-host>/<namespace>/<space-name> - Create an
app.pyfile:import gradio as gr def greet(name): return f"Hello, {name}!" demo = gr.Interface(fn=greet, inputs="text", outputs="text") demo.launch() - Commit and push the code; the platform will automatically build and deploy:
git add app.py git commit -m "Add Gradio app" git push
Quick Start (Streamlit)
- Create a new Space on the platform, choosing the Streamlit type.
- Clone and create an
app.pyfile:import streamlit as st st.title("My AI App") user_input = st.text_input("Enter text") if user_input: st.write(f"You entered: {user_input}") - Commit and push the code; the platform will automatically deploy.
Related Operations
Create Space
How to create an application space on the platform, including form parameters, SDK type selection, and initialization steps.
Gradio Applications
How to create and deploy a Gradio application space, including initialization code and automatic build process.
Streamlit Applications
How to create and deploy a Streamlit application space, including initialization code and automatic build process.
Docker Applications
How to create and deploy a Docker application space, including template selection, custom Dockerfile, and automatic build process.
Download Spaces
How to clone and download Space repositories using Git or CLI tools.