Skip to content

Commit

Permalink
feat: sbv2file
Browse files Browse the repository at this point in the history
  • Loading branch information
Googlefan256 committed Sep 11, 2024
1 parent 6cf9490 commit 115478b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from "react";
import { reloadModels, getModels, synthesize } from "./typing";
import { reloadModels, getModels, synthesize, open } from "./typing";
import { Button } from "./components/ui/button";
import {
Select,
Expand Down Expand Up @@ -40,13 +40,21 @@ function App() {
return (
<div className="flex min-h-[100vh] justify-center items-center">
<p className="text-lg">
モデルを~/AppData/Local/sbv2-gui/modelsに配置してください。
モデルを
<a className="text-slate-600" onClick={() => open()}>
~/AppData/Local/sbv2-gui/models
</a>
に配置してください。
</p>
</div>
);
}
return (
<div className="min-h-[100vh] p-20">
<a className="text-slate-600" onClick={() => open()}>
クリックしてモデルファイルを開く
</a>
<br />
<Label htmlFor="model">使用するモデル</Label>
<Select name="model" onValueChange={(value) => setModel(value)}>
<SelectTrigger className="w-1/3 md:w-1/4">
Expand Down
4 changes: 4 additions & 0 deletions src/typing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ export async function synthesize(
): Promise<number[]> {
return invoke("synthesize", { ident, text, sdpRatio, lengthScale });
}

export async function open(): Promise<string> {
return invoke("open");
}

0 comments on commit 115478b

Please sign in to comment.