[Update] Config Page: Translation, Transcription Tab. Add Select CTranslate2/Whisper Compute Device section.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { useStore_SelectableWhisperComputeDeviceList } from "@store";
|
||||
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||
|
||||
export const useSelectableWhisperComputeDeviceList = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { currentSelectableWhisperComputeDeviceList, updateSelectableWhisperComputeDeviceList, pendingSelectableWhisperComputeDeviceList } = useStore_SelectableWhisperComputeDeviceList();
|
||||
|
||||
const getSelectableWhisperComputeDeviceList = () => {
|
||||
pendingSelectableWhisperComputeDeviceList();
|
||||
asyncStdoutToPython("/get/data/transcription_compute_device_list");
|
||||
};
|
||||
|
||||
return {
|
||||
currentSelectableWhisperComputeDeviceList,
|
||||
getSelectableWhisperComputeDeviceList,
|
||||
updateSelectableWhisperComputeDeviceList,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user