17 lines
321 B
Python
Executable File
17 lines
321 B
Python
Executable File
import httpx
|
|
import asyncio
|
|
|
|
|
|
async def main():
|
|
async with httpx.AsyncClient() as client:
|
|
response = await client.post(
|
|
"http://localhost:8451/predict",
|
|
json={
|
|
"prompt": "紫色实木窗帘",
|
|
}
|
|
)
|
|
print(response.json())
|
|
|
|
|
|
asyncio.run(main())
|