Spaces:
Restarting
Restarting
Check env variables for API keys
Browse files- app_cerebras.py +3 -1
- app_claude.py +3 -1
- app_fireworks.py +3 -1
- app_gemini.py +3 -1
- app_groq.py +3 -1
- app_hyperbolic.py +3 -1
- app_mistral.py +3 -1
- app_nvidia.py +3 -1
- app_openai.py +3 -1
- app_perplexity.py +3 -1
- app_qwen.py +3 -1
- app_sambanova.py +3 -1
- app_together.py +3 -1
- app_xai.py +3 -1
app_cerebras.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import cerebras_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -10,7 +12,7 @@ demo = get_app(
|
|
10 |
],
|
11 |
default_model="llama3.1-70b",
|
12 |
registry=cerebras_gradio.registry,
|
13 |
-
accept_token=
|
14 |
)
|
15 |
|
16 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import cerebras_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
12 |
],
|
13 |
default_model="llama3.1-70b",
|
14 |
registry=cerebras_gradio.registry,
|
15 |
+
accept_token=not os.getenv("CEREBRAS_API_KEY"),
|
16 |
)
|
17 |
|
18 |
if __name__ == "__main__":
|
app_claude.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import anthropic_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -12,7 +14,7 @@ demo = get_app(
|
|
12 |
],
|
13 |
default_model="claude-3-5-sonnet-20241022",
|
14 |
registry=anthropic_gradio.registry,
|
15 |
-
accept_token=
|
16 |
)
|
17 |
|
18 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import anthropic_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
14 |
],
|
15 |
default_model="claude-3-5-sonnet-20241022",
|
16 |
registry=anthropic_gradio.registry,
|
17 |
+
accept_token=not os.getenv("ANTHROPIC_API_KEY"),
|
18 |
)
|
19 |
|
20 |
if __name__ == "__main__":
|
app_fireworks.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import fireworks_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -9,7 +11,7 @@ demo = get_app(
|
|
9 |
],
|
10 |
default_model="f1-preview",
|
11 |
registry=fireworks_gradio.registry,
|
12 |
-
accept_token=
|
13 |
)
|
14 |
|
15 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import fireworks_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
11 |
],
|
12 |
default_model="f1-preview",
|
13 |
registry=fireworks_gradio.registry,
|
14 |
+
accept_token=not os.getenv("FIREWORKS_API_KEY"),
|
15 |
)
|
16 |
|
17 |
if __name__ == "__main__":
|
app_gemini.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import gemini_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -11,7 +13,7 @@ demo = get_app(
|
|
11 |
],
|
12 |
default_model="gemini-1.5-pro",
|
13 |
registry=gemini_gradio.registry,
|
14 |
-
accept_token=
|
15 |
)
|
16 |
|
17 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import gemini_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
13 |
],
|
14 |
default_model="gemini-1.5-pro",
|
15 |
registry=gemini_gradio.registry,
|
16 |
+
accept_token=not os.getenv("GEMINI_API_KEY"),
|
17 |
)
|
18 |
|
19 |
if __name__ == "__main__":
|
app_groq.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import groq_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -16,7 +18,7 @@ demo = get_app(
|
|
16 |
],
|
17 |
default_model="llama3-groq-70b-8192-tool-use-preview",
|
18 |
registry=groq_gradio.registry,
|
19 |
-
accept_token=
|
20 |
)
|
21 |
|
22 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import groq_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
18 |
],
|
19 |
default_model="llama3-groq-70b-8192-tool-use-preview",
|
20 |
registry=groq_gradio.registry,
|
21 |
+
accept_token=not os.getenv("GROQ_API_KEY"),
|
22 |
)
|
23 |
|
24 |
if __name__ == "__main__":
|
app_hyperbolic.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import hyperbolic_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -16,7 +18,7 @@ demo = get_app(
|
|
16 |
],
|
17 |
default_model="Qwen/Qwen2.5-Coder-32B-Instruct",
|
18 |
registry=hyperbolic_gradio.registry,
|
19 |
-
accept_token=
|
20 |
)
|
21 |
|
22 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import hyperbolic_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
18 |
],
|
19 |
default_model="Qwen/Qwen2.5-Coder-32B-Instruct",
|
20 |
registry=hyperbolic_gradio.registry,
|
21 |
+
accept_token=not os.getenv("HYPERBOLIC_API_KEY"),
|
22 |
)
|
23 |
|
24 |
if __name__ == "__main__":
|
app_mistral.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import mistral_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -18,7 +20,7 @@ demo = get_app(
|
|
18 |
],
|
19 |
default_model="pixtral-large-latest",
|
20 |
registry=mistral_gradio.registry,
|
21 |
-
accept_token=
|
22 |
)
|
23 |
|
24 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import mistral_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
20 |
],
|
21 |
default_model="pixtral-large-latest",
|
22 |
registry=mistral_gradio.registry,
|
23 |
+
accept_token=not os.getenv("MISTRAL_API_KEY"),
|
24 |
)
|
25 |
|
26 |
if __name__ == "__main__":
|
app_nvidia.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import nvidia_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -43,7 +45,7 @@ demo = get_app(
|
|
43 |
],
|
44 |
default_model="meta/llama-3.1-70b-instruct",
|
45 |
registry=nvidia_gradio.registry,
|
46 |
-
accept_token=
|
47 |
)
|
48 |
|
49 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import nvidia_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
45 |
],
|
46 |
default_model="meta/llama-3.1-70b-instruct",
|
47 |
registry=nvidia_gradio.registry,
|
48 |
+
accept_token=not os.getenv("NVIDIA_API_KEY"),
|
49 |
)
|
50 |
|
51 |
if __name__ == "__main__":
|
app_openai.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import openai_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -25,7 +27,7 @@ demo = get_app(
|
|
25 |
],
|
26 |
default_model="gpt-4o-2024-11-20",
|
27 |
registry=openai_gradio.registry,
|
28 |
-
accept_token=
|
29 |
)
|
30 |
|
31 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import openai_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
27 |
],
|
28 |
default_model="gpt-4o-2024-11-20",
|
29 |
registry=openai_gradio.registry,
|
30 |
+
accept_token=not os.getenv("OPENAI_API_KEY"),
|
31 |
)
|
32 |
|
33 |
if __name__ == "__main__":
|
app_perplexity.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import perplexity_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -14,7 +16,7 @@ demo = get_app(
|
|
14 |
],
|
15 |
default_model="llama-3.1-sonar-large-128k-online",
|
16 |
registry=perplexity_gradio.registry,
|
17 |
-
accept_token=
|
18 |
)
|
19 |
|
20 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import perplexity_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
16 |
],
|
17 |
default_model="llama-3.1-sonar-large-128k-online",
|
18 |
registry=perplexity_gradio.registry,
|
19 |
+
accept_token=not os.getenv("PERPLEXITY_API_KEY"),
|
20 |
)
|
21 |
|
22 |
if __name__ == "__main__":
|
app_qwen.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import dashscope_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -16,7 +18,7 @@ demo = get_app(
|
|
16 |
],
|
17 |
default_model="qwen-turbo-latest",
|
18 |
registry=dashscope_gradio.registry,
|
19 |
-
accept_token=
|
20 |
)
|
21 |
|
22 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import dashscope_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
18 |
],
|
19 |
default_model="qwen-turbo-latest",
|
20 |
registry=dashscope_gradio.registry,
|
21 |
+
accept_token=not os.getenv("DASHSCOPE_API_KEY"),
|
22 |
)
|
23 |
|
24 |
if __name__ == "__main__":
|
app_sambanova.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import sambanova_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -14,7 +16,7 @@ demo = get_app(
|
|
14 |
],
|
15 |
default_model="Llama-3.2-90B-Vision-Instruct",
|
16 |
registry=sambanova_gradio.registry,
|
17 |
-
accept_token=
|
18 |
multimodal=True,
|
19 |
)
|
20 |
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import sambanova_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
16 |
],
|
17 |
default_model="Llama-3.2-90B-Vision-Instruct",
|
18 |
registry=sambanova_gradio.registry,
|
19 |
+
accept_token=not os.getenv("SAMBANOVA_API_KEY"),
|
20 |
multimodal=True,
|
21 |
)
|
22 |
|
app_together.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import together_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -41,7 +43,7 @@ demo = get_app(
|
|
41 |
],
|
42 |
default_model="meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo",
|
43 |
registry=together_gradio.registry,
|
44 |
-
accept_token=
|
45 |
multimodal=True,
|
46 |
)
|
47 |
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import together_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
43 |
],
|
44 |
default_model="meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo",
|
45 |
registry=together_gradio.registry,
|
46 |
+
accept_token=not os.getenv("TOGETHER_API_KEY"),
|
47 |
multimodal=True,
|
48 |
)
|
49 |
|
app_xai.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import xai_gradio
|
2 |
|
3 |
from utils import get_app
|
@@ -9,7 +11,7 @@ demo = get_app(
|
|
9 |
],
|
10 |
default_model="grok-vision-beta",
|
11 |
registry=xai_gradio.registry,
|
12 |
-
accept_token=
|
13 |
)
|
14 |
|
15 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import xai_gradio
|
4 |
|
5 |
from utils import get_app
|
|
|
11 |
],
|
12 |
default_model="grok-vision-beta",
|
13 |
registry=xai_gradio.registry,
|
14 |
+
accept_token=not os.getenv("XAI_API_KEY"),
|
15 |
)
|
16 |
|
17 |
if __name__ == "__main__":
|