Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,16 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
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()
|