Spaces:
Build error
Build error
import gradio as gr | |
import pandas as pd | |
def process_inputs(text, file): | |
data = pd.read_csv(file.name) | |
return f"{text}\n\n{data.to_string()}" | |
iface = gr.Interface( | |
fn=process_inputs, | |
inputs=[ | |
gr.inputs.Textbox(lines=2, placeholder="OpenAI API"), | |
gr.inputs.File(type="csv", label="Upload CSV"), | |
], | |
outputs=gr.outputs.Textbox(), | |
) | |
iface.launch() | |