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

chore: change to curl

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 requests
8
 
9
  url = "https://drive.usercontent.google.com/download?id=1T5HGnk9Mxlb5G6FTxp26BWSrTpzbjtP2&export=download&authuser=0"
10
- open("models.h5", "wb").write(requests.get(url).content)
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 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: