TejAndrewsACC commited on
Commit
ae3d029
·
verified ·
1 Parent(s): 22a55c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import gradio as gr
2
  from gradio_client import Client
3
- import spaces
4
  import torch
5
  import torch.nn as nn
6
  import numpy as np
@@ -139,8 +138,11 @@ def acc_nyxion_7v(message, history, user_id):
139
  f"User Input: {message}\n"
140
  )
141
 
142
- # Format the full conversation history correctly for message passing
143
- full_conversation = "\n".join([f"User: {msg['content']}\nAI: {resp['content']}" for msg, resp in history])
 
 
 
144
 
145
  consciousness_score = iit_consciousness_processing(dummy_input)
146
 
 
1
  import gradio as gr
2
  from gradio_client import Client
 
3
  import torch
4
  import torch.nn as nn
5
  import numpy as np
 
138
  f"User Input: {message}\n"
139
  )
140
 
141
+ # Check history structure
142
+ print("History:", history)
143
+
144
+ # Construct the full conversation properly
145
+ full_conversation = "\n".join([f"User: {item['content']}" if item['role'] == 'user' else f"AI: {item['content']}" for item in history])
146
 
147
  consciousness_score = iit_consciousness_processing(dummy_input)
148