ariansyahdedy commited on
Commit
58a3adb
·
1 Parent(s): f10d8ff

Initial Commit

Browse files
Files changed (1) hide show
  1. README.md +25 -0
README.md CHANGED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: FastAPI Streaming API
3
+ emoji: 🚀
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: docker
7
+ pinned: false
8
+ ---
9
+
10
+ # FastAPI Streaming API
11
+
12
+ This Hugging Face Space hosts a FastAPI backend that provides two endpoints:
13
+
14
+ 1. **Text Streaming Endpoint (`/v1/test_text`)** - Streams text word by word in Server-Sent Events (SSE) format.
15
+ 2. **Chart & Text Streaming Endpoint (`/v1/test_chart`)** - Streams a Base64-encoded chart followed by text data.
16
+
17
+ ## Deployment Instructions
18
+
19
+ This Space is containerized using Docker. It runs a FastAPI application on port `7860`.
20
+
21
+ ## Example Usage
22
+
23
+ ### **Text Streaming**
24
+ ```sh
25
+ curl -X POST "https://YOUR_USERNAME-fastapi-streaming.hf.space/v1/test_text" -H "Accept: text/event-stream"