jonathanagustin commited on
Commit
999040d
1 Parent(s): 8208df3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -147,9 +147,8 @@ class LiveStreamAnnotator:
147
  def download_font(url, save_path):
148
  os.system(f"wget {url} -O {save_path}")
149
  with zipfile.ZipFile(save_path, "r") as zip_ref:
150
- font_dir = "/usr/share/fonts/open-sans"
151
- zip_ref.extractall(font_dir)
152
- return os.path.join(font_dir, "OpenSans-Regular.ttf")
153
 
154
  def capture_frame(self, url):
155
  stream_url = SearchService.get_stream_url(url)
@@ -279,5 +278,5 @@ class LiveStreamAnnotator:
279
  share=True, debug=True, quiet=True, show_api=False, height=800
280
  )
281
 
282
-
283
- LiveStreamAnnotator().render()
 
147
  def download_font(url, save_path):
148
  os.system(f"wget {url} -O {save_path}")
149
  with zipfile.ZipFile(save_path, "r") as zip_ref:
150
+ zip_ref.extractall(".")
151
+ return os.path.join(".", "OpenSans-Regular.ttf")
 
152
 
153
  def capture_frame(self, url):
154
  stream_url = SearchService.get_stream_url(url)
 
278
  share=True, debug=True, quiet=True, show_api=False, height=800
279
  )
280
 
281
+ if __name__ == "__main__":
282
+ LiveStreamAnnotator().render()