Plashkar commited on
Commit
06f0e1d
·
1 Parent(s): a72fef3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -5
app.py CHANGED
@@ -1,7 +1,16 @@
1
  import gradio as gr
 
 
 
 
 
 
 
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
-
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
1
  import gradio as gr
2
+ import numpy as np
3
+ import pandas as pd
4
+
5
+ def fileRead(name):
6
+ df = pd.read_csv('Plashkar/diabetes-predict-db')
7
+ # Renaming DiabetesPedigreeFunction as DPF
8
+ df = df.rename(columns={'DiabetesPedigreeFunction':'DPF'})
9
+ return df
10
 
11
+ with demo:
12
+ inp = gr.Textbox(placeholder="Enter a statement to complete")
13
+ out1 = gr.Textbox()
14
+ inp.change(fn=fileRead, inputs=inp,
15
+ outputs=out1)
16
+ demo.launch()