File size: 1,274 Bytes
934df70
7f5eec6
934df70
 
 
 
7f5eec6
934df70
 
991dd3b
 
934df70
7f5eec6
934df70
 
 
991dd3b
7f5eec6
934df70
7f5eec6
991dd3b
7f5eec6
991dd3b
7f5eec6
 
 
991dd3b
7f5eec6
59cef27
7f5eec6
 
 
 
 
934df70
7f5eec6
934df70
7f5eec6
991dd3b
934df70
7f5eec6
 
934df70
991dd3b
 
934df70
7f5eec6
 
 
 
934df70
7f5eec6
991dd3b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#### INSTALLATIONS
```bash
# 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
```bash
# I'm using nano editor.
# You can use any file editor you want.
nano jarvis # or whatever you want.
```

### JARVIS SCRIPT
```python
#!/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)
```
```bash
# Set permission (Linux/Android [Termux]/MacOS).
# Windows users set permissions to 755 according with linux.
chmod a+x jarvis
```

### RUN JARVIS
```bash
./jarvis "Your message here."
# According the name file you create.
```

#### LINUX USER's
```bash
# Bonus for more flexible.
sudo mv jarvis /bin/ai

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