Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -32,10 +32,15 @@ user_sessions: Dict[str, Dict] = {}
|
|
32 |
|
33 |
# Model Images
|
34 |
avatar_images = {
|
35 |
-
"
|
36 |
"DeepSeek-R1": "https://logosandtypes.com/wp-content/uploads/2025/02/deepseek.svg",
|
37 |
"Mistral Large": "https://logosandtypes.com/wp-content/uploads/2025/02/mistral-ai.svg",
|
38 |
-
"Meta-Llama-3.3-70B-Instruct": "https://registry.npmmirror.com/@lobehub/icons-static-png/1.46.0/files/dark/meta-color.png"
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
class OpenFloorResearchAgent:
|
@@ -387,8 +392,8 @@ class VisualConsensusEngine:
|
|
387 |
'api_key': sambanova_key,
|
388 |
'available': bool(sambanova_key)
|
389 |
},
|
390 |
-
'
|
391 |
-
'name': '
|
392 |
'api_key': sambanova_key,
|
393 |
'available': bool(sambanova_key)
|
394 |
}
|
@@ -594,7 +599,7 @@ class VisualConsensusEngine:
|
|
594 |
model_mapping = {
|
595 |
'sambanova_deepseek': 'DeepSeek-R1',
|
596 |
'sambanova_llama': 'Meta-Llama-3.3-70B-Instruct',
|
597 |
-
'
|
598 |
}
|
599 |
model_name = model_mapping.get(calling_model, 'Meta-Llama-3.3-70B-Instruct')
|
600 |
|
@@ -1110,7 +1115,7 @@ class VisualConsensusEngine:
|
|
1110 |
model_mapping = {
|
1111 |
'sambanova_deepseek': 'DeepSeek-R1',
|
1112 |
'sambanova_llama': 'Meta-Llama-3.3-70B-Instruct',
|
1113 |
-
'
|
1114 |
}
|
1115 |
|
1116 |
sambanova_model = model_mapping.get(model, 'Meta-Llama-3.3-70B-Instruct')
|
@@ -1134,7 +1139,7 @@ class VisualConsensusEngine:
|
|
1134 |
temperature=0.7
|
1135 |
)
|
1136 |
else:
|
1137 |
-
#
|
1138 |
print(f"Model {sambanova_model} doesn't support function calling - using regular completion")
|
1139 |
completion = client.chat.completions.create(
|
1140 |
model=sambanova_model,
|
@@ -1866,7 +1871,7 @@ def check_model_status_session(session_id_state: str = None, request: gr.Request
|
|
1866 |
'Mistral Large': mistral_key,
|
1867 |
'DeepSeek-R1': sambanova_key,
|
1868 |
'Meta-Llama-3.3-70B-Instruct': sambanova_key,
|
1869 |
-
'
|
1870 |
}
|
1871 |
|
1872 |
for model_name, available in models.items():
|
@@ -1885,10 +1890,9 @@ with gr.Blocks(title="π Consilium: Multi-AI Expert Consensus Platform - OFP (
|
|
1885 |
**Watch expert AI models collaborate with live research to solve your most complex decisions**
|
1886 |
|
1887 |
### π Features:
|
1888 |
-
|
1889 |
* Visual roundtable of the AI models, including speech bubbles to see the discussion in real time.
|
1890 |
-
* Includes Mistral (**mistral-large-latest**) via their API and the Models **DeepSeek-R1**, **Meta-Llama-3.3-70B-Instruct** and **
|
1891 |
-
* Research Agents
|
1892 |
* Assign different roles to the models, the protocol they should follow, and decide the communication strategy.
|
1893 |
* Pick one model as the lead analyst (had the best results when picking Mistral).
|
1894 |
* Configure the amount of discussion rounds.
|
@@ -1938,7 +1942,7 @@ with gr.Blocks(title="π Consilium: Multi-AI Expert Consensus Platform - OFP (
|
|
1938 |
)
|
1939 |
|
1940 |
moderator_model = gr.Dropdown(
|
1941 |
-
choices=["mistral", "sambanova_deepseek", "sambanova_llama", "
|
1942 |
value="mistral",
|
1943 |
label="π¨ββοΈ Lead Analyst",
|
1944 |
info="Mistral works best as Lead"
|
@@ -1958,7 +1962,7 @@ with gr.Blocks(title="π Consilium: Multi-AI Expert Consensus Platform - OFP (
|
|
1958 |
# The visual roundtable component
|
1959 |
roundtable = consilium_roundtable(
|
1960 |
label="AI Expert Roundtable",
|
1961 |
-
label_icon="https://
|
1962 |
value=json.dumps({
|
1963 |
"participants": [],
|
1964 |
"messages": [],
|
|
|
32 |
|
33 |
# Model Images
|
34 |
avatar_images = {
|
35 |
+
"Qwen3-32B": "https://cdn-avatars.huggingface.co/v1/production/uploads/620760a26e3b7210c2ff1943/-s1gyJfvbE1RgO5iBeNOi.png",
|
36 |
"DeepSeek-R1": "https://logosandtypes.com/wp-content/uploads/2025/02/deepseek.svg",
|
37 |
"Mistral Large": "https://logosandtypes.com/wp-content/uploads/2025/02/mistral-ai.svg",
|
38 |
+
"Meta-Llama-3.3-70B-Instruct": "https://registry.npmmirror.com/@lobehub/icons-static-png/1.46.0/files/dark/meta-color.png",,
|
39 |
+
"arXiv Research Agent": "https://public.boxcloud.com/api/2.0/internal_files/804104772302/versions/860288648702/representations/png_paged_2048x2048/content/1.png?access_token=1!r4Iuj5vkFMywOMAPQ4M6QIr3eqkJ6CjlMzh77DAkRcGdVRvzG-Xh6GFZz_JkzoJuO9yRR5cQ6cs5VvUolhHxNM6JdliJ2JOi9VWm-BbB5C63s0_7bpaQYLFAJmLnlG2RzhX74_bK4XS-csGP8CI-9tVa6LUcrCNTKJmc-yddIepopLMZLqJ34h0nu69Yt0Not4yDErBTk2jWaneTBdhdXErOhCs9cz4HK-itpCfdL3Lze9oAjf6o8EVWRn6R0YPw95trQl7IziLd1P78BFuVaDjborvhs_yWgcw0uxXNZz_8WZh5z5NOvDq6sMo0uYGWiJ_g1JWyiaDJpsWBlHRiRwwF5FZLsVSXRz6dXD1MtKyOPs8J6CBYkGisicIysuiPsT1Kcyrgm-3jH1-tanOVs66TCmnGNbSYH_o_-x9iOdkI8rEL7-l2i5iHn22i-q8apZTOd_eQp22UCsmUBJQig7att_AwVKasmqOegDZHO2h1b_vSjeZ8ISBcg8i7fnFdF9Ej35s6OFkV5IyZtMzbAKdRlwdt5lupsshO5FCByR0kau9PVIiwJilI0t7zYsJtSXzVxVQEyEPuLTAlJJI7827NoNA1OSojaPsfhFrW4jEfJIgMoxNl_vFfZvLBmAA7Pk1SeaN7J0ebDji-bDbwqlPadp7JOB3s2Six11fm4Ss.&shared_link=https%3A%2F%2Fcornell.app.box.com%2Fv%2Farxiv-logomark-small-png&box_client_name=box-content-preview&box_client_version=3.7.0",
|
40 |
+
"GitHub Research Agent": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/GitHub_Invertocat_Logo.svg/250px-GitHub_Invertocat_Logo.svg.png"
|
41 |
+
"SEC EDGAR Research Agent": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Seal_of_the_United_States_Securities_and_Exchange_Commission.svg/250px-Seal_of_the_United_States_Securities_and_Exchange_Commission.svg.png",
|
42 |
+
"Web Search Research Agent": "https://uxwing.com/wp-content/themes/uxwing/download/brands-and-social-media/duckduckgo-icon.png",
|
43 |
+
"Wikipedia Research Agent": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Wikipedia-logo-v2.svg/103px-Wikipedia-logo-v2.svg.png"
|
44 |
}
|
45 |
|
46 |
class OpenFloorResearchAgent:
|
|
|
392 |
'api_key': sambanova_key,
|
393 |
'available': bool(sambanova_key)
|
394 |
},
|
395 |
+
'sambanova_qwen': {
|
396 |
+
'name': 'Qwen3-32B',
|
397 |
'api_key': sambanova_key,
|
398 |
'available': bool(sambanova_key)
|
399 |
}
|
|
|
599 |
model_mapping = {
|
600 |
'sambanova_deepseek': 'DeepSeek-R1',
|
601 |
'sambanova_llama': 'Meta-Llama-3.3-70B-Instruct',
|
602 |
+
'sambanova_qwen': 'Qwen3-32B'
|
603 |
}
|
604 |
model_name = model_mapping.get(calling_model, 'Meta-Llama-3.3-70B-Instruct')
|
605 |
|
|
|
1115 |
model_mapping = {
|
1116 |
'sambanova_deepseek': 'DeepSeek-R1',
|
1117 |
'sambanova_llama': 'Meta-Llama-3.3-70B-Instruct',
|
1118 |
+
'sambanova_qwen': 'Qwen3-32B'
|
1119 |
}
|
1120 |
|
1121 |
sambanova_model = model_mapping.get(model, 'Meta-Llama-3.3-70B-Instruct')
|
|
|
1139 |
temperature=0.7
|
1140 |
)
|
1141 |
else:
|
1142 |
+
# Qwen3-32B and other models that don't support function calling
|
1143 |
print(f"Model {sambanova_model} doesn't support function calling - using regular completion")
|
1144 |
completion = client.chat.completions.create(
|
1145 |
model=sambanova_model,
|
|
|
1871 |
'Mistral Large': mistral_key,
|
1872 |
'DeepSeek-R1': sambanova_key,
|
1873 |
'Meta-Llama-3.3-70B-Instruct': sambanova_key,
|
1874 |
+
'Qwen3-32B': sambanova_key
|
1875 |
}
|
1876 |
|
1877 |
for model_name, available in models.items():
|
|
|
1890 |
**Watch expert AI models collaborate with live research to solve your most complex decisions**
|
1891 |
|
1892 |
### π Features:
|
|
|
1893 |
* Visual roundtable of the AI models, including speech bubbles to see the discussion in real time.
|
1894 |
+
* Includes Mistral (**mistral-large-latest**) via their API and the Models **DeepSeek-R1**, **Meta-Llama-3.3-70B-Instruct** and **Qwen3-32B** via the SambaNova API.
|
1895 |
+
* Optional Research Agents (**Web Search**, **Wikipedia**, **arXiv**, **GitHub**, **SEC EDGAR**) added via the [Open Floor Protocol](https://github.com/open-voice-interoperability/openfloor-docs).
|
1896 |
* Assign different roles to the models, the protocol they should follow, and decide the communication strategy.
|
1897 |
* Pick one model as the lead analyst (had the best results when picking Mistral).
|
1898 |
* Configure the amount of discussion rounds.
|
|
|
1942 |
)
|
1943 |
|
1944 |
moderator_model = gr.Dropdown(
|
1945 |
+
choices=["mistral", "sambanova_deepseek", "sambanova_llama", "sambanova_qwen"],
|
1946 |
value="mistral",
|
1947 |
label="π¨ββοΈ Lead Analyst",
|
1948 |
info="Mistral works best as Lead"
|
|
|
1962 |
# The visual roundtable component
|
1963 |
roundtable = consilium_roundtable(
|
1964 |
label="AI Expert Roundtable",
|
1965 |
+
label_icon="https://avatars.githubusercontent.com/u/46052400?s=48&v=4",
|
1966 |
value=json.dumps({
|
1967 |
"participants": [],
|
1968 |
"messages": [],
|