1
This commit is contained in:
16
app/litserve_app/client.py
Executable file
16
app/litserve_app/client.py
Executable file
@@ -0,0 +1,16 @@
|
||||
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())
|
||||
Reference in New Issue
Block a user