sahanacp commited on
Commit
d84f689
·
verified ·
1 Parent(s): b70b478

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -1
app.py CHANGED
@@ -107,6 +107,18 @@ def create_gradio_app():
107
  from interface import create_interface
108
  return create_interface(process_query, clear_context)
109
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  def main():
111
  """Main application entry point"""
112
  try:
@@ -117,9 +129,11 @@ def main():
117
  a_task = Task.get_task(project_name='langchain_callback_demo', task_name='llm')
118
  loer = a_task.get_logger()
119
  report_logs(loer)
120
-
121
  # report text as debug example
122
  report_debug_text(loer)
 
 
 
123
  except Exception as e:
124
  logger.error(f"Error in main: {str(e)}")
125
  raise
 
107
  from interface import create_interface
108
  return create_interface(process_query, clear_context)
109
 
110
+ def report_table(loer, iteration=0):
111
+ # type: (Logger, int) -> ()
112
+ """
113
+ reporting tables to the plots section
114
+ :param logger: The task.logger to use for sending the plots
115
+ :param iteration: The iteration number of the current reports
116
+ """
117
+ # report table
118
+ # Report table - CSV from path
119
+ csv_url = './data/cleaned_dataset_full.csv'
120
+ logger.report_table("table - csv", "remote csv", iteration=iteration, url=csv_url)
121
+
122
  def main():
123
  """Main application entry point"""
124
  try:
 
129
  a_task = Task.get_task(project_name='langchain_callback_demo', task_name='llm')
130
  loer = a_task.get_logger()
131
  report_logs(loer)
 
132
  # report text as debug example
133
  report_debug_text(loer)
134
+ # report graphs
135
+ report_table(loer)
136
+ loer.flush()
137
  except Exception as e:
138
  logger.error(f"Error in main: {str(e)}")
139
  raise