ProfessorLeVesseur commited on
Commit
11365fc
·
verified ·
1 Parent(s): 596c1e2

Update data_processor.py

Browse files
Files changed (1) hide show
  1. data_processor.py +16 -5
data_processor.py CHANGED
@@ -233,7 +233,8 @@
233
  import re
234
  import pandas as pd
235
  import os
236
- from huggingface_hub import InferenceClient
 
237
 
238
  class DataProcessor:
239
  INTERVENTION_COLUMN_OPTIONS = [
@@ -245,11 +246,21 @@ class DataProcessor:
245
  PARTIALLY_ENGAGED_STR = 'Partially Engaged'
246
  NOT_ENGAGED_STR = 'Not Engaged'
247
 
 
 
 
 
 
 
 
 
 
 
248
  def __init__(self, student_metrics_df=None):
249
- self.hf_api_key = os.getenv('HF_API_KEY')
250
- if not self.hf_api_key:
251
- raise ValueError("HF_API_KEY not set in environment variables")
252
- self.client = InferenceClient(api_key=self.hf_api_key)
253
  self.student_metrics_df = student_metrics_df
254
  self.intervention_column = None # Will be set when processing data
255
 
 
233
  import re
234
  import pandas as pd
235
  import os
236
+ # from huggingface_hub import InferenceClient
237
+ from mistralai import Mistral
238
 
239
  class DataProcessor:
240
  INTERVENTION_COLUMN_OPTIONS = [
 
246
  PARTIALLY_ENGAGED_STR = 'Partially Engaged'
247
  NOT_ENGAGED_STR = 'Not Engaged'
248
 
249
+ # HF INFERENCE
250
+ # def __init__(self, student_metrics_df=None):
251
+ # self.hf_api_key = os.getenv('HF_API_KEY')
252
+ # if not self.hf_api_key:
253
+ # raise ValueError("HF_API_KEY not set in environment variables")
254
+ # self.client = InferenceClient(api_key=self.hf_api_key)
255
+ # self.student_metrics_df = student_metrics_df
256
+ # self.intervention_column = None # Will be set when processing data
257
+
258
+ # MISTRAL INFERENCE
259
  def __init__(self, student_metrics_df=None):
260
+ self.mistral_api_key = os.getenv('MISTRAL_API_KEY')
261
+ if not self.mistral_api_key:
262
+ raise ValueError("MISTRAL_API_KEY not set in environment variables")
263
+ self.client = Mistral(api_key=self.mistral_api_key)
264
  self.student_metrics_df = student_metrics_df
265
  self.intervention_column = None # Will be set when processing data
266