Spaces:
Sleeping
Sleeping
faisal-fida
commited on
Commit
·
06e8ea4
1
Parent(s):
2f05f53
da
Browse files
app.py
CHANGED
|
@@ -1,10 +1,15 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
|
|
|
|
| 3 |
|
| 4 |
-
def greet(name, image):
|
| 5 |
-
return "Hello " + name + "!!", image
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
| 10 |
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import pandas as pd
|
| 3 |
+
from sklearn.linear_model import LinearRegression
|
| 4 |
|
| 5 |
+
lr = LinearRegression()
|
| 6 |
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
def greet(text, file):
|
| 9 |
+
df = pd.read_csv(file)
|
| 10 |
+
model = lr.fit(df)
|
| 11 |
+
return model.predict(text)
|
| 12 |
|
| 13 |
+
|
| 14 |
+
iface = gr.Interface(fn=greet, inputs=["text", "file"], outputs="text")
|
| 15 |
iface.launch()
|