Upload videos to an index
file_id = await moonshine.upload( src="./your-video.mp4", index="your-index-name", )
file_id
file_id = await moonshine.upload( src="https://example.com/video.mp4", index="your-index-name", )
def progress_callback(report: dict): print(report)
file_id = await moonshine.upload( src="./your-video.mp4", index="your-index-name", progress_callback=progress_callback )
import moonshine import asyncio moonshine.config('YOUR TOKEN HERE') async def upload_file(src, index): def progress_callback(report: dict): print(report) file_id = await moonshine.upload( src=src, index=index, progress_callback=progress_callback ) return file_id async def main(): file_id = await upload_file("your-video.mp4", "your-index-name") print(f'File ID: {file_id}') await main()
.upload() Params