Skip to content

Commit

Permalink
πŸ” ML μ„œλ²„ 톡합에 λ”°λ₯Έ env 및 μ‚¬μš© μ½”λ“œ μˆ˜μ •
Browse files Browse the repository at this point in the history
  • Loading branch information
529539 committed Jun 14, 2024
1 parent acfa88b commit 377eeb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
10 changes: 2 additions & 8 deletions src/service/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import axios from "axios";
import { getSession } from "next-auth/react";
import { loginToUse } from "@utils/alerts/auth";

export const sttClient = axios.create({
baseURL: process.env.NEXT_PUBLIC_STT_SERVER_URL || "/",
withCredentials: true,
});

export const ferttsClient = axios.create({
baseURL: process.env.NEXT_PUBLIC_FERTTS_SERVER_URL || "/",
export const modelClient = axios.create({
baseURL: process.env.NEXT_PUBLIC_ML_SERVER_URL || "/",
withCredentials: true,
});

Expand Down
8 changes: 4 additions & 4 deletions src/service/api/model.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { sttClient, ferttsClient } from ".";
import { modelClient } from ".";

export const modelSTT = async (body: FormData) => {
const url = `/model/stt`;
return sttClient.post(url, body);
return modelClient.post(url, body);
};

export const modelFER = async (body: FormData) => {
const url = `/model/fer`;
return ferttsClient.post(url, body);
return modelClient.post(url, body);
};

type TTSBodyType = {
questionList: { id: number; questionText: string }[];
};
export const modelTTS = async (body: TTSBodyType) => {
const url = `/model/tts`;
return ferttsClient.post(url, body);
return modelClient.post(url, body);
};

0 comments on commit 377eeb2

Please sign in to comment.