Skip to content

Commit

Permalink
Merge pull request #90 from Solution-Challenge-stress-solution/dev_kyko
Browse files Browse the repository at this point in the history
refactor: mmodify yml
  • Loading branch information
rhrudska987 authored Feb 19, 2024
2 parents 052ce06 + 21d717f commit 8148cff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,16 @@ public Map<String, String> predict(MultipartFile audioFile, Long diaryId) {
throw new RuntimeException(e);
}

// 머신러닝 서버에 연결
ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 12345)
// 머신러닝 서버에 연결 ml-y5v4w7qczq-du.a.run.app/216.239.36.53
ManagedChannel channel = ManagedChannelBuilder.forAddress("ml-y5v4w7qczq-du.a.run.app", 8080)
.usePlaintext()
.build();

System.out.println("----------------------");
System.out.println("서버 연결 완료");
// 머신러닝 서버에 gRPC 요청
MyMLModelGrpc.MyMLModelBlockingStub stub = MyMLModelGrpc.newBlockingStub(channel);
System.out.println(stub.getChannel());
PredictRequest request = PredictRequest.newBuilder()
.setAudio(ByteString.copyFrom(audioBytes))
.build();
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ spring:
port:6379

grpc:
# server:
# port: 8080
client:
test:
address: static://localhost:65534
address: static://34.64.90.112:8080
enableKeepAlive: true
keepAliveWithoutCalls: true
negotiationType: plaintext

0 comments on commit 8148cff

Please sign in to comment.