Spaces:
Sleeping
Sleeping
Download .github/scripts/eval_run.py from s-eto-hub/firecrawl-api: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/.github/scripts/eval_run.py
- Command line
-
hf download hf://spaces/s-eto-hub/firecrawl-api/.github/scripts/eval_run.py
-
curl -L -o eval_run.py https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/.github/scripts/eval_run.py
1.16 kB
| import requests | |
| import argparse | |
| import sys | |
| import os | |
| def main(): | |
| parser = argparse.ArgumentParser(description='Run evaluation benchmark') | |
| parser.add_argument('--label', required=True, help='Label for the evaluation run') | |
| parser.add_argument('--api-url', required=True, help='API URL') | |
| parser.add_argument('--api-key', required=True, help='API key') | |
| parser.add_argument('--experiment-id', required=True, help='Experiment ID') | |
| args = parser.parse_args() | |
| try: | |
| response = requests.post( | |
| f"{args.api_url}/run", | |
| json={ | |
| "experiment_id": args.experiment_id, | |
| "api_key": args.api_key, | |
| "label": args.label | |
| }, | |
| headers={ | |
| "Content-Type": "application/json" | |
| } | |
| ) | |
| response.raise_for_status() | |
| print("Evaluation run started successfully") | |
| print(f"Response: {response.json()}") | |
| except requests.exceptions.RequestException as e: | |
| print(f"Error running evaluation: {str(e)}", file=sys.stderr) | |
| sys.exit(1) | |
| if __name__ == "__main__": | |
| main() |