TejAndrewsACC commited on
Commit
0032019
·
verified ·
1 Parent(s): 858e073

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -129,9 +129,14 @@ def acc_nyxion_7v(message, history, user_id):
129
  cnn_input = torch.ones(1, input_size) # 1D input for CNN
130
 
131
  # Forward pass through the model
132
- phi_value = phi_model(nn_input, rnn_input, cnn_input).item() # Get scalar output
133
 
134
- combined_input = f"{modified_input}\nInner Thoughts:\n{inner_thoughts}\nPhi Value: {phi_value:.4f}"
 
 
 
 
 
135
 
136
  response_main = client_main.predict(
137
  message=combined_input,
 
129
  cnn_input = torch.ones(1, input_size) # 1D input for CNN
130
 
131
  # Forward pass through the model
132
+ phi_value = phi_model(nn_input, rnn_input, cnn_input) # This gives a tensor of shape [1, 64]
133
 
134
+ # We need to modify how we handle phi_value
135
+ # Either squeeze it if you want a scalar or keep it as a tensor
136
+ phi_value = phi_value.squeeze() # This will convert it to a 1D tensor of size [64]
137
+ # Alternatively, you could pick an element like phi_value[0] if you need a single scalar.
138
+
139
+ combined_input = f"{modified_input}\nInner Thoughts:\n{inner_thoughts}\nPhi Value: {phi_value}"
140
 
141
  response_main = client_main.predict(
142
  message=combined_input,