Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ def analyze_single(text):
|
|
| 8 |
return result, summary, wc_img
|
| 9 |
|
| 10 |
def analyze_batch(file):
|
| 11 |
-
df = pd.read_csv(
|
| 12 |
results = []
|
| 13 |
summaries = []
|
| 14 |
combined_text = ""
|
|
@@ -39,7 +39,7 @@ with gr.Blocks() as demo:
|
|
| 39 |
btn.click(analyze_single, inputs=inp, outputs=[out1, out2, out3])
|
| 40 |
|
| 41 |
with gr.Tab("Batch Upload (CSV)"):
|
| 42 |
-
file_in = gr.File(label="Upload CSV with 'comment' column", type="
|
| 43 |
df_out = gr.Dataframe(label="Analysis Results")
|
| 44 |
wc_out = gr.Image(label="Word Cloud")
|
| 45 |
file_in.change(analyze_batch, inputs=file_in, outputs=[df_out, wc_out])
|
|
|
|
| 8 |
return result, summary, wc_img
|
| 9 |
|
| 10 |
def analyze_batch(file):
|
| 11 |
+
df = pd.read_csv(file_path)
|
| 12 |
results = []
|
| 13 |
summaries = []
|
| 14 |
combined_text = ""
|
|
|
|
| 39 |
btn.click(analyze_single, inputs=inp, outputs=[out1, out2, out3])
|
| 40 |
|
| 41 |
with gr.Tab("Batch Upload (CSV)"):
|
| 42 |
+
file_in = gr.File(label="Upload CSV with 'comment' column", type="filepath")
|
| 43 |
df_out = gr.Dataframe(label="Analysis Results")
|
| 44 |
wc_out = gr.Image(label="Word Cloud")
|
| 45 |
file_in.change(analyze_batch, inputs=file_in, outputs=[df_out, wc_out])
|