File size: 360 Bytes
3f9cf1b
f55c257
 
3f9cf1b
f55c257
ef2ecb8
f55c257
 
3f9cf1b
ef2ecb8
 
 
 
af149c9
3f9cf1b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr
import joblib
from skops import io as sio

def convert(file):
    print(file)
    obj = joblib.load(file)
    return sio.dumps(obj)


file_output = gr.File()
upload_button = gr.UploadButton("Click to Upload a File", file_types=None, file_count="single")

iface = gr.Interface(fn=convert, inputs=upload_button, outputs="file")
iface.launch()