mariotawfik commited on
Commit
f14da5e
·
1 Parent(s): 31cd022
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -133,6 +133,12 @@ def encrypt_encoded_quantize(encodings):
133
  fhe_api = FHEModelClient(f"fhe_model", f".fhe_keys/{eval_key}")
134
  fhe_api.load()
135
 
 
 
 
 
 
 
136
  encodings = np.array(encodings, dtype=np.float32)
137
 
138
  # Check for NaN or Inf values
 
133
  fhe_api = FHEModelClient(f"fhe_model", f".fhe_keys/{eval_key}")
134
  fhe_api.load()
135
 
136
+ # Ensure encodings is a NumPy array
137
+ if isinstance(encodings, str):
138
+ # If encodings is a string, try to evaluate it to a list or array
139
+ encodings = eval(encodings)
140
+
141
+ # Ensure it's converted to a NumPy array with the correct dtype
142
  encodings = np.array(encodings, dtype=np.float32)
143
 
144
  # Check for NaN or Inf values