Update app.py
Browse files
app.py
CHANGED
@@ -182,6 +182,18 @@ class ChatHistory(gr.components.Component):
|
|
182 |
self.data_summary = ""
|
183 |
self._current_df = None
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
def analyze_and_visualize(file, message, history, api_key, chat_history):
|
186 |
"""Main function for data analysis with improved state management"""
|
187 |
if not file and chat_history.current_df is None:
|
|
|
182 |
self.data_summary = ""
|
183 |
self._current_df = None
|
184 |
|
185 |
+
def preprocess(self, payload):
|
186 |
+
"""
|
187 |
+
Preprocess the input data before it is passed to the component.
|
188 |
+
"""
|
189 |
+
return payload
|
190 |
+
|
191 |
+
def postprocess(self, value):
|
192 |
+
"""
|
193 |
+
Postprocess the output data before it is returned from the component.
|
194 |
+
"""
|
195 |
+
return value
|
196 |
+
|
197 |
def analyze_and_visualize(file, message, history, api_key, chat_history):
|
198 |
"""Main function for data analysis with improved state management"""
|
199 |
if not file and chat_history.current_df is None:
|