Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,14 +12,14 @@ else:
|
|
| 12 |
base_url="https://openrouter.ai/api/v1",
|
| 13 |
api_key=api_key,
|
| 14 |
)
|
| 15 |
-
|
| 16 |
def compare_models(user_prompt):
|
| 17 |
if not client:
|
| 18 |
return "Error: API Key not configured.", "Error: API Key not configured.", "Error: API Key not configured."
|
| 19 |
|
| 20 |
model_1 = "mistralai/mistral-7b-instruct"
|
| 21 |
model_2 = "meta-llama/llama-3-8b-instruct"
|
| 22 |
-
model_3 = "
|
| 23 |
|
| 24 |
try:
|
| 25 |
response_1 = client.chat.completions.create(
|
|
@@ -56,10 +56,10 @@ demo = gr.Interface(
|
|
| 56 |
outputs=[
|
| 57 |
gr.Textbox(label="Model 1: Mistral 7B"),
|
| 58 |
gr.Textbox(label="Model 2: LLaMA 3 8B"),
|
| 59 |
-
gr.Textbox(label="Model 3:
|
| 60 |
],
|
| 61 |
title="🤖 OpenRouter Model Arena",
|
| 62 |
description="Enter one prompt and see the results from three different AI models side-by-side. (Powered by OpenRouter)"
|
| 63 |
)
|
| 64 |
|
| 65 |
-
demo.launch()
|
|
|
|
| 12 |
base_url="https://openrouter.ai/api/v1",
|
| 13 |
api_key=api_key,
|
| 14 |
)
|
| 15 |
+
|
| 16 |
def compare_models(user_prompt):
|
| 17 |
if not client:
|
| 18 |
return "Error: API Key not configured.", "Error: API Key not configured.", "Error: API Key not configured."
|
| 19 |
|
| 20 |
model_1 = "mistralai/mistral-7b-instruct"
|
| 21 |
model_2 = "meta-llama/llama-3-8b-instruct"
|
| 22 |
+
model_3 = "anthropic/claude-3-haiku" # <-- This is the new, working model
|
| 23 |
|
| 24 |
try:
|
| 25 |
response_1 = client.chat.completions.create(
|
|
|
|
| 56 |
outputs=[
|
| 57 |
gr.Textbox(label="Model 1: Mistral 7B"),
|
| 58 |
gr.Textbox(label="Model 2: LLaMA 3 8B"),
|
| 59 |
+
gr.Textbox(label="Model 3: Claude 3 Haiku") # <-- I updated the label to match
|
| 60 |
],
|
| 61 |
title="🤖 OpenRouter Model Arena",
|
| 62 |
description="Enter one prompt and see the results from three different AI models side-by-side. (Powered by OpenRouter)"
|
| 63 |
)
|
| 64 |
|
| 65 |
+
demo.launch() # <-- I fixed the typo here (removed extra parenthesis)
|