nlp-bot / app.py
faisal-fida
da
06e8ea4
raw
history blame contribute delete
310 Bytes
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()