Spaces:
Sleeping
Sleeping
Download server.py from vettri06/virtual_prompt_war: direct link, hf CLI and curl.
- Browser
- Download file 721 Bytes
-
https://huggingface.co/spaces/vettri06/virtual_prompt_war/resolve/main/server.py
- Command line
-
hf download hf://spaces/vettri06/virtual_prompt_war/server.py
-
curl -L -o server.py https://huggingface.co/spaces/vettri06/virtual_prompt_war/resolve/main/server.py
721 Bytes
| """Run the Python Election Process Assistant.""" | |
| from __future__ import annotations | |
| import argparse | |
| import os | |
| try: | |
| from dotenv import load_dotenv | |
| except ModuleNotFoundError: # Optional helper for local .env files. | |
| def load_dotenv() -> bool: | |
| return False | |
| from election_assistant.web import run_server | |
| def main() -> None: | |
| load_dotenv() | |
| parser = argparse.ArgumentParser(description="Run the Python Election Process Assistant") | |
| parser.add_argument("--host", default=os.getenv("HOST", "127.0.0.1")) | |
| parser.add_argument("--port", default=int(os.getenv("PORT", "4173")), type=int) | |
| args = parser.parse_args() | |
| run_server(args.host, args.port) | |
| if __name__ == "__main__": | |
| main() | |