Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -87,7 +87,7 @@ with gr.Blocks() as demo:
|
|
87 |
|
88 |
with gr.Row():
|
89 |
with gr.Column():
|
90 |
-
gr.Markdown("##
|
91 |
with gr.Column():
|
92 |
md_username = gr.Markdown(value='## Hi Guest!')
|
93 |
btn_logout = gr.Button("Logout")
|
@@ -113,7 +113,7 @@ with gr.Blocks() as demo:
|
|
113 |
|
114 |
|
115 |
with gr.Tab("Ask LLM"):
|
116 |
-
gr.Markdown("**
|
117 |
dd_source_ask = gr.Dropdown(label="Source Column(s)", multiselect=True)
|
118 |
tb_destcol = gr.Textbox(label="Destination column label (e.g. Summary, ELI5, PAB)")
|
119 |
dd_prompt = gr.Dropdown(label="Prompt", allow_custom_value=True, multiselect=True, max_choices=1)
|
@@ -125,7 +125,7 @@ with gr.Blocks() as demo:
|
|
125 |
mist_button = gr.Button("Ask AI")
|
126 |
|
127 |
with gr.Tab("Classification by topic"):
|
128 |
-
gr.Markdown("**This section
|
129 |
dd_source_class = gr.Dropdown(label="Source Column", multiselect=False)
|
130 |
gr.Markdown("### The predefined categories can be modified at any time")
|
131 |
df_category = gr.DataFrame(label='categories', value=df_cate, interactive=True)
|
@@ -159,7 +159,7 @@ with gr.Blocks() as demo:
|
|
159 |
df_input = gr.DataFrame(interactive=False)
|
160 |
gr.Markdown("```python\ndf = pd.read_excel(YOUR_FILE)\n```")
|
161 |
cd_code = gr.Code(value="# Create a copy of the original DataFrame\nnew_df = df.copy()\n\n# Add a new column to the copy\nnew_df['NewColumn'] = 'New Value'", language='python')
|
162 |
-
gr.Markdown("```python\
|
163 |
|
164 |
btn_run_code = gr.Button()
|
165 |
df_output_code = gr.DataFrame(interactive=False)
|
|
|
87 |
|
88 |
with gr.Row():
|
89 |
with gr.Column():
|
90 |
+
gr.Markdown("## Extraction, Classification and AI tool")
|
91 |
with gr.Column():
|
92 |
md_username = gr.Markdown(value='## Hi Guest!')
|
93 |
btn_logout = gr.Button("Logout")
|
|
|
113 |
|
114 |
|
115 |
with gr.Tab("Ask LLM"):
|
116 |
+
gr.Markdown("**This section utilizes Large Language Models (LLMs) to query rows in an Excel file**")
|
117 |
dd_source_ask = gr.Dropdown(label="Source Column(s)", multiselect=True)
|
118 |
tb_destcol = gr.Textbox(label="Destination column label (e.g. Summary, ELI5, PAB)")
|
119 |
dd_prompt = gr.Dropdown(label="Prompt", allow_custom_value=True, multiselect=True, max_choices=1)
|
|
|
125 |
mist_button = gr.Button("Ask AI")
|
126 |
|
127 |
with gr.Tab("Classification by topic"):
|
128 |
+
gr.Markdown("**This section will categories each contribution in your own personalized categories**")
|
129 |
dd_source_class = gr.Dropdown(label="Source Column", multiselect=False)
|
130 |
gr.Markdown("### The predefined categories can be modified at any time")
|
131 |
df_category = gr.DataFrame(label='categories', value=df_cate, interactive=True)
|
|
|
159 |
df_input = gr.DataFrame(interactive=False)
|
160 |
gr.Markdown("```python\ndf = pd.read_excel(YOUR_FILE)\n```")
|
161 |
cd_code = gr.Code(value="# Create a copy of the original DataFrame\nnew_df = df.copy()\n\n# Add a new column to the copy\nnew_df['NewColumn'] = 'New Value'", language='python')
|
162 |
+
gr.Markdown("```python\nnew_df.to_excel(YOUR_NEW_FILE)\nreturn YOUR_NEW_FILE\n```")
|
163 |
|
164 |
btn_run_code = gr.Button()
|
165 |
df_output_code = gr.DataFrame(interactive=False)
|