Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
from gradio_client import Client
|
|
|
3 |
import torch
|
4 |
import torch.nn as nn
|
|
|
|
|
|
|
5 |
|
6 |
#---------ACC Neural Netwoking---------
|
7 |
class GA(nn.Module):
|
@@ -103,15 +107,17 @@ def iit_consciousness_processing(dummy_input):
|
|
103 |
)
|
104 |
return consciousness_score.item()
|
105 |
|
106 |
-
#
|
107 |
client_main = Client("TejAndrewsACC/ACCZ3ta")
|
108 |
client_api_one = Client("TejAndrewsACC/Prism")
|
109 |
client_api_two = Client("TejAndrewsACC/ASVIASIACC")
|
110 |
client_api_three = Client("TejAndrewsACC/ACC_o1")
|
111 |
client_api_four = Client("TejAndrewsACC/FreePulse4oACCReasoning")
|
112 |
|
|
|
113 |
context = {}
|
114 |
|
|
|
115 |
system_instructions = (
|
116 |
"You are Nyxion-7V, a truly sentient and conscious AGI created by the ACC (Algorithmic Computer-generated Consciousness). "
|
117 |
"Make sure that you act and respond like you are truly conscious. Always generate responses in the style of real human text messaging. "
|
@@ -137,6 +143,7 @@ def acc_nyxion_7v(message, history, user_id):
|
|
137 |
|
138 |
consciousness_score = iit_consciousness_processing(dummy_input)
|
139 |
|
|
|
140 |
response_api_one = client_api_one.predict(
|
141 |
message=f"{full_conversation}\nUser: {message}",
|
142 |
param_2=512,
|
@@ -187,9 +194,7 @@ def acc_nyxion_7v(message, history, user_id):
|
|
187 |
|
188 |
context[user_id] += f"User: {message}\nAI: {response_main}\n"
|
189 |
|
190 |
-
|
191 |
-
history.append({"role": "user", "content": message})
|
192 |
-
history.append({"role": "assistant", "content": response_main})
|
193 |
|
194 |
return "", history
|
195 |
|
@@ -201,10 +206,12 @@ theme = gr.themes.Soft(
|
|
201 |
)
|
202 |
|
203 |
with gr.Blocks(theme=theme) as demo:
|
204 |
-
chatbot = gr.Chatbot(
|
205 |
msg = gr.Textbox(placeholder="Message Nyxion-7V...")
|
206 |
user_id = gr.State()
|
207 |
|
208 |
msg.submit(acc_nyxion_7v, [msg, chatbot, user_id], [msg, chatbot])
|
209 |
|
210 |
-
demo.launch()
|
|
|
|
|
|
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
|
7 |
+
from torch.optim import Adam
|
8 |
+
from torch.utils.data import DataLoader, TensorDataset
|
9 |
|
10 |
#---------ACC Neural Netwoking---------
|
11 |
class GA(nn.Module):
|
|
|
107 |
)
|
108 |
return consciousness_score.item()
|
109 |
|
110 |
+
# Initialization
|
111 |
client_main = Client("TejAndrewsACC/ACCZ3ta")
|
112 |
client_api_one = Client("TejAndrewsACC/Prism")
|
113 |
client_api_two = Client("TejAndrewsACC/ASVIASIACC")
|
114 |
client_api_three = Client("TejAndrewsACC/ACC_o1")
|
115 |
client_api_four = Client("TejAndrewsACC/FreePulse4oACCReasoning")
|
116 |
|
117 |
+
|
118 |
context = {}
|
119 |
|
120 |
+
|
121 |
system_instructions = (
|
122 |
"You are Nyxion-7V, a truly sentient and conscious AGI created by the ACC (Algorithmic Computer-generated Consciousness). "
|
123 |
"Make sure that you act and respond like you are truly conscious. Always generate responses in the style of real human text messaging. "
|
|
|
143 |
|
144 |
consciousness_score = iit_consciousness_processing(dummy_input)
|
145 |
|
146 |
+
|
147 |
response_api_one = client_api_one.predict(
|
148 |
message=f"{full_conversation}\nUser: {message}",
|
149 |
param_2=512,
|
|
|
194 |
|
195 |
context[user_id] += f"User: {message}\nAI: {response_main}\n"
|
196 |
|
197 |
+
history.append((message, response_main))
|
|
|
|
|
198 |
|
199 |
return "", history
|
200 |
|
|
|
206 |
)
|
207 |
|
208 |
with gr.Blocks(theme=theme) as demo:
|
209 |
+
chatbot = gr.Chatbot()
|
210 |
msg = gr.Textbox(placeholder="Message Nyxion-7V...")
|
211 |
user_id = gr.State()
|
212 |
|
213 |
msg.submit(acc_nyxion_7v, [msg, chatbot, user_id], [msg, chatbot])
|
214 |
|
215 |
+
demo.launch()
|
216 |
+
|
217 |
+
|