adrin commited on
Commit
ef2ecb8
1 Parent(s): c510d73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -3,8 +3,13 @@ import joblib
3
  from skops import io as sio
4
 
5
  def convert(file):
 
6
  obj = joblib.load(file)
7
  return sio.dumps(obj)
8
 
9
- iface = gr.Interface(fn=convert, inputs="file", outputs="file")
 
 
 
 
10
  iface.launch()
 
3
  from skops import io as sio
4
 
5
  def convert(file):
6
+ print(file)
7
  obj = joblib.load(file)
8
  return sio.dumps(obj)
9
 
10
+
11
+ file_output = gr.File()
12
+ upload_button = gr.UploadButton("Click to Upload a File", file_types=None, file_count="single")
13
+
14
+ iface = gr.Interface(fn=convert, inputs=upload_button, outputs=gr.UploadButton())
15
  iface.launch()