KLypse / test_stream.py
DEVJHAWAR11
Deploy Klypse backend
54bef2f
raw
history blame contribute delete
266 Bytes
import requests
url = "http://localhost:8000/api/v1/ask/stream"
payload = {"video_id": "U8PZejZ0F-c", "question": "What is the main story in this video?"}
with requests.post(url, json=payload, stream=True) as r:
for line in r.iter_lines():
print(line)