Q-Prefer-D2 / code /Q-Prefer /examples /http_client.py
qgfvadfuvads's picture
Upload Q-Prefer training and inference code
aa7758f verified
Raw
History Blame Contribute Delete
371 Bytes
#!/usr/bin/env python3
"""Minimal client example for videos on a shared filesystem."""
from qprefer_reward.client import QPreferHTTPClient
client = QPreferHTTPClient("http://127.0.0.1:18080", api_key="change-me")
scores = client.score_paths(
videos=["/shared/rollouts/example.mp4"],
prompts=["A red fox runs through a snowy forest."],
)
print(scores.as_dict())