17 lines
456 B
Python
17 lines
456 B
Python
from gradio_client import (Client)
|
|
|
|
client = Client("https://confucius.youdao.com/")
|
|
result = client.predict(
|
|
message={"text": "Describe this image",
|
|
"files": 'https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'},
|
|
model_selection="Confucius3-Math",
|
|
max_tokens=16384,
|
|
temperature=1,
|
|
top_p=0.7,
|
|
top_k=-1,
|
|
presence_penalty=0,
|
|
frequency_penalty=0,
|
|
api_name="/chat"
|
|
)
|
|
print(result)
|