File size: 515 Bytes
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
#### Installation

```
pip show gradio_client > /dev/null 2>&1

if [ $? -ne 0 ]; then
    pip install gradio_client
else
    pip install gradio_client --upgrade
fi
```

#### Script

```
nano jarvis.py
```

```
#!/usr/bin/env python3
from gradio_client import Client

jarvis = Client("hadadrjt/ai")

# Your message here.
input = "Hi"

result = jarvis.predict(
    multi_input={"text": input}, 
    api_name="/api"
)
responses = result[0][0][1]
print(responses)
```

#### Run

```
chmod a+x jarvis.py
./jarvis.py
```