Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ index = GPTSimpleVectorIndex.load_from_disk('email.json')
|
|
17 |
|
18 |
df = pd.read_feather("emails.feather")
|
19 |
df2 = df["subject"].replace([None], "<no title>").head(10).to_frame()
|
|
|
20 |
|
21 |
def search_emails(opt, message, n=3):
|
22 |
"Outputs the top n emails that match the most the pattern"
|
@@ -78,7 +79,6 @@ with gr.Blocks(title=title) as demo:
|
|
78 |
value=df2,
|
79 |
max_cols=1,
|
80 |
max_rows=4,
|
81 |
-
title="Documents loaded",
|
82 |
overflow_row_behaviour="paginate",
|
83 |
)
|
84 |
btn_upload = gr.UploadButton("Upload a new document...", file_types=["text"])
|
|
|
17 |
|
18 |
df = pd.read_feather("emails.feather")
|
19 |
df2 = df["subject"].replace([None], "<no title>").head(10).to_frame()
|
20 |
+
df2 = df2.rename({'subject': 'Emails titles'}, axis=1)
|
21 |
|
22 |
def search_emails(opt, message, n=3):
|
23 |
"Outputs the top n emails that match the most the pattern"
|
|
|
79 |
value=df2,
|
80 |
max_cols=1,
|
81 |
max_rows=4,
|
|
|
82 |
overflow_row_behaviour="paginate",
|
83 |
)
|
84 |
btn_upload = gr.UploadButton("Upload a new document...", file_types=["text"])
|