Saim8250 commited on
Commit
1045d43
·
1 Parent(s): e73825a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -1,7 +1,19 @@
1
  import fastai
2
  from fastai.vision.all import*
3
  import gradio as gr
 
 
4
 
 
 
 
 
 
 
 
 
 
 
5
  def is_cat(x):returnx[0].isupper()
6
 
7
  learn=load_learner('resnett.pkl')
 
1
  import fastai
2
  from fastai.vision.all import*
3
  import gradio as gr
4
+ import pickle
5
+ import pickletools
6
 
7
+ # store the pickle data in a file named 'payload.pkl'
8
+ with open('resnet.pkl', 'wb') as f:
9
+ pickle.dump(var, f)
10
+
11
+ # disassemble the pickle
12
+ # and print the instructions to the command line
13
+ with open('resnet.pkl', 'rb') as f:
14
+ pickletools.dis(f)
15
+
16
+
17
  def is_cat(x):returnx[0].isupper()
18
 
19
  learn=load_learner('resnett.pkl')