Spaces:
Sleeping
Sleeping
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() | |