gary-boon Claude Opus 4.5 commited on
Commit
15a862b
·
1 Parent(s): 172a186

Fix: Import time module at top level for SSE events

Browse files

The sse_event() helper function uses time.time() but time was only
imported inside the event_generator function, causing NameError.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. backend/model_service.py +1 -0
backend/model_service.py CHANGED
@@ -10,6 +10,7 @@ from pydantic import BaseModel
10
  import asyncio
11
  import json
12
  import os
 
13
  import torch
14
  from transformers import AutoModelForCausalLM, AutoTokenizer
15
  from typing import Optional, List, Dict, Any
 
10
  import asyncio
11
  import json
12
  import os
13
+ import time
14
  import torch
15
  from transformers import AutoModelForCausalLM, AutoTokenizer
16
  from typing import Optional, List, Dict, Any