--- title: FastAPI Streaming API emoji: 🚀 colorFrom: blue colorTo: green sdk: docker pinned: false --- # FastAPI Streaming API This Hugging Face Space hosts a FastAPI backend that provides two endpoints: 1. **Text Streaming Endpoint (`/v1/test_text`)** - Streams text word by word in Server-Sent Events (SSE) format. 2. **Chart & Text Streaming Endpoint (`/v1/test_chart`)** - Streams a Base64-encoded chart followed by text data. ## Deployment Instructions This Space is containerized using Docker. It runs a FastAPI application on port `7860`. ## Example Usage ### **Text Streaming** ```sh curl -X POST "https://ariansyahdedy-frontend-test.hf.space/v1/test_text" -H "Accept: text/event-stream" ``` ### **Chart & Text Streaming** ```sh curl -X POST "https://YOUR_USERNAME-fastapi-streaming.hf.space/v1/test_chart" -H "Accept: text/event-stream" ```