satyamr196 commited on
Commit
fb5d66c
·
1 Parent(s): 2f5d98f

added cpu score check to see the performance of allocated cpu in free tier

Browse files
Files changed (1) hide show
  1. ASR_Server.py +6 -1
ASR_Server.py CHANGED
@@ -7,6 +7,11 @@ import threading
7
  import os
8
  os.environ["HF_HOME"] = "/tmp/huggingface"
9
 
 
 
 
 
 
10
  job_status = {
11
  "running": False,
12
  "model": None,
@@ -161,7 +166,7 @@ def asr_models():
161
  "ESPnet"
162
  ]
163
  def background_job():
164
- generateTranscript("openai/whisper-base")
165
 
166
  # Start the background job in a separate thread
167
  threading.Thread(target=background_job).start()
 
7
  import os
8
  os.environ["HF_HOME"] = "/tmp/huggingface"
9
 
10
+ #Check cpu score
11
+ import timeit
12
+ cpu_score = timeit.timeit("sum(range(1000000))", number=5)
13
+ print(f"🧠 CPU benchmark score: {cpu_score:.2f}")
14
+
15
  job_status = {
16
  "running": False,
17
  "model": None,
 
166
  "ESPnet"
167
  ]
168
  def background_job():
169
+ generateTranscript("openai/whisper-tiny")
170
 
171
  # Start the background job in a separate thread
172
  threading.Thread(target=background_job).start()