Spaces:
Running
Running
TejAndrewsACC
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -7,27 +7,25 @@ hf_token = os.getenv("HF_TOKEN").strip()
|
|
7 |
client = InferenceClient(api_key=hf_token)
|
8 |
|
9 |
messages = [
|
10 |
-
|
11 |
]
|
12 |
|
13 |
def chat_with_o3(user_input):
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
demo = gr.ChatInterface(
|
28 |
fn=chat_with_o3,
|
29 |
title="ACC-o3",
|
30 |
-
description="ACC
|
31 |
examples=["How many 'r's are in strawberry?", "Tell me about the ACC.", "Who are you?"],
|
32 |
theme="TejAndrewsACC/ACC"
|
33 |
)
|
|
|
7 |
client = InferenceClient(api_key=hf_token)
|
8 |
|
9 |
messages = [
|
10 |
+
{"role": "user", "content": "You are ACC-o3, created by the ACC (Algorithmic Computer-generated Consciousness)."},
|
11 |
]
|
12 |
|
13 |
def chat_with_o3(user_input):
|
14 |
+
stream = client.chat.completions.create(
|
15 |
+
model="deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
|
16 |
+
messages=messages,
|
17 |
+
temperature=0.5,
|
18 |
+
max_tokens=2048,
|
19 |
+
top_p=0.7,
|
20 |
+
stream=True
|
21 |
+
)
|
22 |
+
for chunk in stream:
|
23 |
+
print(chunk.choices[0].delta.content)
|
24 |
+
|
25 |
+
demo = gr.ChatInterface(
|
|
|
|
|
26 |
fn=chat_with_o3,
|
27 |
title="ACC-o3",
|
28 |
+
description="ACC-o3 is a powerful model created by the ACC.",
|
29 |
examples=["How many 'r's are in strawberry?", "Tell me about the ACC.", "Who are you?"],
|
30 |
theme="TejAndrewsACC/ACC"
|
31 |
)
|