Projects STRLCPY Maryam Commits 2f4539d5
🤬
  • To answer Mr. Saeed's comments = - show the output in the module_run function. In this function, just prepare the output. - use self.output instead of print

  • Loading...
  • Hatma Suryotrisongko committed 2 years ago
    2f4539d5
    1 parent 241d5baf
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    maryam/modules/iris/topicmodeling.py
    skipped 41 lines
    42 42   run.run_sklearn_cluster_kmeans(self.options['pretrained_model'], self.options['showcharts'], self.options['verbose'])
    43 43   
    44 44   results = run.run_topic_modeling_bertopic(self.options['pretrained_model'], self.options['verbose'])
    45  - print("\n\nResults = \n")
    46  - print( results )
     45 + self.output("\n\nResults = \n")
     46 + self.output( results )
    47 47   
    48 48   output = {'results': results.to_json(orient="records") }
    49  - print("\n\nOutput = \n")
    50  - print( output )
    51 49   
    52 50   inputfile = self.options['inputfile']
    53 51   self.save_gather(output, 'iris/topicmodeling', inputfile, output=self.options['output'])
    54 52   
    55 53   if self.options['keyword'] is not None:
    56  - print(" keyword = " + self.options['keyword'])
     54 + self.output(" keyword = " + self.options['keyword'])
    57 55   run.run_search_topics_top2vec(self.options['keyword'], self.options['showcharts'], self.options['verbose'])
    58 56   
    59 57   return output
    60 58   
    61 59   
    62 60  def module_run(self):
    63  - module_api(self)
     61 + output = module_api(self)
     62 + self.output("\n\nOutput = \n")
     63 + self.output( output )
Please wait...
Page is in error, reload to recover