Spaces:
sierrafr
/
Runtime error

test / API.md
hadadrjt's picture
ai: Sayonara Gemini :(
c7c62f6

A newer version of the Gradio SDK is available: 5.27.1

Upgrade

INSTALLATIONS

# Linux/Android (Termux)/MacOS/Windows.
# Make sure you have "python3" and "pip" installed.
# This package have very small size.
pip install gradio_client rich --upgrade

# If you are using Python 3.12 or newer.
pip install gradio_client rich --upgrade --ignore-installed --break-system-packages

CREATE JARVIS FILE

# I'm using nano editor.
# You can use any file editor you want.
nano jarvis # or whatever you want.

JARVIS MAIN SCRIPT

#!/usr/bin/env python3
import sys
from gradio_client import Client
from rich.console import Console
from rich.markdown import Markdown
console = Console()
jarvis = Client("hadadrjt/ai")
input = " ".join(sys.argv[1:]) if len(sys.argv) > 1 else "Hi!"
result = jarvis.predict(multi={"text": input}, api_name="/api")
responses = result[0][0][1]
markdown = Markdown(responses)
console.print(markdown)

JARVIS MULTI PLATFORM SCRIPT

#!/usr/bin/env python3
import sys
from gradio_client import Client
from rich.console import Console
from rich.markdown import Markdown
console = Console()
jarvis = Client("hadadrjt/ai")
model = "JARVIS: 2.1.2" # default to JARVIS, you can change the model here.
jarvis.predict(new=model, api_name="/change_model")
input_text = " ".join(sys.argv[1:]) if len(sys.argv) > 1 else "Hi!"
result = jarvis.predict(multi={"text": input_text}, api_name="/api")
response_text = result[0][0][1]
console.print(Markdown(response_text))

SET PERMISSION

# Set permission (Linux/Android [Termux]/MacOS).
# Windows users set permissions to 755 according with linux.
chmod a+x jarvis

RUN JARVIS

./jarvis "Your message here."
# According the name file you create.

LINUX USER's

# Bonus for more flexible.
sudo mv jarvis /bin/ai

# Now you can run with simple command.
ai "Your message here."

AVAILABLE MODELS

Choose one of the model name for the JARVIS multi platform.

1. JARVIS: 2.1.2
2. DeepSeek: V3-0324
3. DeepSeek: R1 (Reasoning)
4. DeepSeek: R1 - Distill Qwen 14B (Reasoning)
5. DeepSeek: R1 - Distill Qwen 32B (Reasoning)
6. DeepSeek: R1 - Distill Llama 70B (Reasoning)
7. Google: Gemma 3 1B-IT
8. Google: Gemma 3 4B-IT
9. Google: Gemma 3 27B-IT
10. Meta: Llama 3.1 8B Instruct
11. Meta: Llama 3.2 3B Instruct
12. Meta: Llama 3.3 70B Instruct
13. Meta: Llama 4 Maverick 17B 128E Instruct
14. Meta: Llama 4 Scout 17B 16E Instruct
15. Qwen: Qwen2.5 VL 3B Instruct
16. Qwen: Qwen2.5 VL 32B Instruct
17. Qwen: Qwen2.5 VL 72B Instruct
18. Agentica: Deepcoder 14B Preview