Spaces:
Runtime error
Runtime error
File size: 496 Bytes
bae6af8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import asyncio
import json
import uuid
import os
from main import inference_core
async def run_test():
prompt = "today ipl match"
history = []
sandbox = {"overlay_mode": False}
try:
async for chunk_type, content in inference_core.generate_stream(prompt, history, sandbox=sandbox):
print(f"[{chunk_type}] {content}")
except Exception as e:
import traceback
traceback.print_exc()
if __name__ == "__main__":
asyncio.run(run_test())
|