Jina-4.py
· 270 B · Python
Eredeti
from jina import Client
from docarray import DocList
from executor import Prompt, Generation
prompt = Prompt(text='suggest an interesting image generation prompt')
client = Client(port=12345)
response = client.post('/', inputs=[prompt], return_type=DocList[Generation])
1 | from jina import Client |
2 | from docarray import DocList |
3 | from executor import Prompt, Generation |
4 | |
5 | prompt = Prompt(text='suggest an interesting image generation prompt') |
6 | client = Client(port=12345) |
7 | response = client.post('/', inputs=[prompt], return_type=DocList[Generation]) |