Spaces:
Sleeping
Sleeping
File size: 310 Bytes
4197aad 06e8ea4 4197aad 06e8ea4 4197aad 2f05f53 06e8ea4 2f05f53 06e8ea4 2f05f53 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
import pandas as pd
from sklearn.linear_model import LinearRegression
lr = LinearRegression()
def greet(text, file):
df = pd.read_csv(file)
model = lr.fit(df)
return model.predict(text)
iface = gr.Interface(fn=greet, inputs=["text", "file"], outputs="text")
iface.launch()
|