ARKAISW commited on
Commit
92bf44e
·
1 Parent(s): 10150dc

Fix: Force Python 3.11 and Gradio 5.x to resolve audioop error on HF

Browse files
Files changed (3) hide show
  1. README.md +2 -1
  2. engine/simulation.py +2 -0
  3. run_simulation.py +2 -0
README.md CHANGED
@@ -4,9 +4,10 @@ emoji: ⚡
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 4.0.0
8
  app_file: app.py
9
  pinned: false
 
10
  ---
11
 
12
  # MarketMind
 
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 5.4.4
8
  app_file: app.py
9
  pinned: false
10
+ python_version: 3.11
11
  ---
12
 
13
  # MarketMind
engine/simulation.py CHANGED
@@ -37,6 +37,7 @@ class SimulationConfig:
37
  use_llm: bool = False # False = offline deterministic mode
38
  vllm_base_url: str = "http://localhost:8000/v1"
39
  vllm_model: str = "Qwen/Qwen2.5-7B-Instruct"
 
40
  output_dir: str = "output"
41
  seed: int = 42
42
  log_to_csv: bool = True
@@ -67,6 +68,7 @@ class SimulationEngine:
67
  if config.use_llm:
68
  self.llm_client = VLLMClient(
69
  base_url=config.vllm_base_url,
 
70
  model=config.vllm_model,
71
  )
72
 
 
37
  use_llm: bool = False # False = offline deterministic mode
38
  vllm_base_url: str = "http://localhost:8000/v1"
39
  vllm_model: str = "Qwen/Qwen2.5-7B-Instruct"
40
+ vllm_api_key: str = "EMPTY" # For HF serverless or secured endpoints
41
  output_dir: str = "output"
42
  seed: int = 42
43
  log_to_csv: bool = True
 
68
  if config.use_llm:
69
  self.llm_client = VLLMClient(
70
  base_url=config.vllm_base_url,
71
+ api_key=config.vllm_api_key,
72
  model=config.vllm_model,
73
  )
74
 
run_simulation.py CHANGED
@@ -44,6 +44,7 @@ def main():
44
  parser.add_argument("--llm", action="store_true", help="Use vLLM inference (requires server)")
45
  parser.add_argument("--url", type=str, default="http://localhost:8000/v1", help="vLLM server URL")
46
  parser.add_argument("--model", type=str, default="Qwen/Qwen2.5-7B-Instruct", help="Model name")
 
47
  parser.add_argument("--output", type=str, default="output", help="Output directory for CSVs")
48
  parser.add_argument("--seed", type=int, default=42, help="Random seed for reproducibility")
49
  args = parser.parse_args()
@@ -54,6 +55,7 @@ def main():
54
  use_llm=args.llm,
55
  vllm_base_url=args.url,
56
  vllm_model=args.model,
 
57
  output_dir=args.output,
58
  seed=args.seed,
59
  )
 
44
  parser.add_argument("--llm", action="store_true", help="Use vLLM inference (requires server)")
45
  parser.add_argument("--url", type=str, default="http://localhost:8000/v1", help="vLLM server URL")
46
  parser.add_argument("--model", type=str, default="Qwen/Qwen2.5-7B-Instruct", help="Model name")
47
+ parser.add_argument("--api-key", type=str, default="EMPTY", help="API Key for Hugging Face Serverless or other secured endpoints")
48
  parser.add_argument("--output", type=str, default="output", help="Output directory for CSVs")
49
  parser.add_argument("--seed", type=int, default=42, help="Random seed for reproducibility")
50
  args = parser.parse_args()
 
55
  use_llm=args.llm,
56
  vllm_base_url=args.url,
57
  vllm_model=args.model,
58
+ vllm_api_key=args.api_key,
59
  output_dir=args.output,
60
  seed=args.seed,
61
  )