xcurvnubaim commited on
Commit
9f97673
·
1 Parent(s): 8218a21

chore: change to subprocess

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,10 +4,10 @@ import gradio as gr
4
  import tensorflow as tf
5
  from io import StringIO
6
  from PIL import Image
7
- import os
8
 
9
  url = "https://drive.usercontent.google.com/download?id=1T5HGnk9Mxlb5G6FTxp26BWSrTpzbjtP2&export=download&authuser=0"
10
- os.system("curl -o models.h5 -L " + url)
11
  labels = []
12
  model = load_model('/content/models.h5')
13
  with open("/content/name of the animals.txt") as f:
 
4
  import tensorflow as tf
5
  from io import StringIO
6
  from PIL import Image
7
+ import subprocess
8
 
9
  url = "https://drive.usercontent.google.com/download?id=1T5HGnk9Mxlb5G6FTxp26BWSrTpzbjtP2&export=download&authuser=0"
10
+ subprocess.run(["curl", "-o", "models.h5", "-L", url])
11
  labels = []
12
  model = load_model('/content/models.h5')
13
  with open("/content/name of the animals.txt") as f: