Skip to content

Commit ec6257e

Browse files
committed
Add example to Readme
1 parent ec4db29 commit ec6257e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ and
4646
# Example: Using the Java Client
4747

4848
```java
49-
Pool<Jedis> pool = ...
50-
RedisAI rts = new RedisAI(pool);
49+
RedisAI client = new RedisAI("localhost", 6379);
50+
client.setModel("model", Backend.TF, Device.CPU, new String[] {"a", "b"}, new String[] {"mul"}, "graph.pb");
51+
52+
client.setTensor("a", new float[] {2, 3}, new int[]{2});
53+
client.setTensor("b", new float[] {2, 3}, new int[]{2});
54+
55+
client.runModel("model", new String[] {"a", "b"}, new String[] {"c"});
5156
```

0 commit comments

Comments
 (0)