|
@@ -92,7 +92,7 @@ public class GRPCController extends BaseController {
|
|
|
}
|
|
|
Iterator<PredictionResponse> response = stub.streamPredictions(request);
|
|
|
while (response.hasNext()){
|
|
|
- String responseStr = response.next().toString();
|
|
|
+ String responseStr = response.next().getPrediction().toStringUtf8();
|
|
|
// System.out.println(unicodeToChinese(responseStr.substring(16, responseStr.length()-1)) + "---" + responseStr);
|
|
|
System.out.println(responseStr);
|
|
|
}
|
|
@@ -129,7 +129,7 @@ public class GRPCController extends BaseController {
|
|
|
}
|
|
|
Iterator<PredictionResponse> response = stub.streamPredictions(request);
|
|
|
while (response.hasNext()){
|
|
|
- String responseStr = response.next().toString();
|
|
|
+ String responseStr = response.next().getPrediction().toStringUtf8();
|
|
|
// System.out.println(unicodeToChinese(responseStr.substring(16, responseStr.length()-1)) + "---" + responseStr);
|
|
|
|
|
|
System.out.println(responseStr);
|
|
@@ -166,7 +166,7 @@ public class GRPCController extends BaseController {
|
|
|
}
|
|
|
Iterator<PredictionResponse> response = stub.streamPredictions(request);
|
|
|
while (response.hasNext()){
|
|
|
- String responseStr = response.next().toString();
|
|
|
+ String responseStr = response.next().getPrediction().toStringUtf8();
|
|
|
// System.out.println(unicodeToChinese(responseStr.substring(16, responseStr.length()-1)) + "---" + responseStr);
|
|
|
System.out.println(responseStr);
|
|
|
}
|
|
@@ -202,7 +202,7 @@ public class GRPCController extends BaseController {
|
|
|
}
|
|
|
Iterator<PredictionResponse> response = stub.streamPredictions(request);
|
|
|
while (response.hasNext()){
|
|
|
- String responseStr = response.next().toString();
|
|
|
+ String responseStr = response.next().getPrediction().toStringUtf8();
|
|
|
// System.out.println(unicodeToChinese(responseStr.substring(16, responseStr.length()-1)) + "---" + responseStr);
|
|
|
System.out.println(responseStr);
|
|
|
}
|