File size: 499 Bytes
7f59544
4057e14
 
 
7f59544
 
4057e14
7f59544
4057e14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import gradio as gr
import pandas as pd
import numpy as np
import pickle


remote_df = pd.read_excel('test_df.xlsx')

def predict(x1, x2):

  X = np.array([x1, x2], ndmin = 2)

  with open('test_model.pkl', 'rb') as model:
    clf = pickle.load(model)

  y_pred = clf.predict(X)

  return y_pred + remote_df['col1'][0]

demo = gr.Interface(
    predict,
    inputs = [gr.Number(), gr.Number()],
    outputs = gr.Number(),
    examples=[
    ],
    title = 'Deploy Test'
)

demo.launch(share = True)