acarz commited on
Commit
ab87bd9
·
verified ·
1 Parent(s): 5f38e83

Create index

Browse files
Files changed (1) hide show
  1. index +26 -0
index ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pickle
3
+
4
+ # Load the model
5
+ model = pickle.load(open('maas.pkl', 'rb'))
6
+
7
+ # Define the prediction function
8
+ def predict_salary(tecrube, yazili, sozlu):
9
+ tahmin = model.predict([[tecrube, yazili, sozlu]])
10
+ return round(tahmin[0][0], 2)
11
+
12
+ # Create the Gradio interface
13
+ iface = gr.Interface(
14
+ fn=predict_salary,
15
+ inputs=[
16
+ gr.Number(label='Tecrübe', minimum=1, maximum=10),
17
+ gr.Number(label='Yazılı Sınav', minimum=1, maximum=10),
18
+ gr.Number(label='Sözlü Sınav', minimum=1, maximum=10)
19
+ ],
20
+ outputs='text',
21
+ title='Tecrübe, Yazılı Sınav ve Mülakata Göre Maaş Tahmini :heavy_dollar_sign:',
22
+ description='Maaşınızı tahmin etmek için tecrübe, yazılı ve sözlü sınav puanlarınızı girin.'
23
+ )
24
+
25
+ # Launch the interface
26
+ iface.launch()