Skip to content

Commit

Permalink
フォーマッタ(isort)実行
Browse files Browse the repository at this point in the history
  • Loading branch information
shun-harutaro committed Aug 13, 2024
1 parent 31b4bd2 commit 9cd06db
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 12 deletions.
4 changes: 3 additions & 1 deletion api/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from contextlib import asynccontextmanager
from typing import Union

from fastapi import FastAPI
from contextlib import asynccontextmanager

from routers import raspi
from utils.config import check_env_variables

Expand Down
15 changes: 8 additions & 7 deletions api/routers/raspi.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import os
import tempfile
from datetime import datetime
from typing import Any, Dict

from fastapi import APIRouter, File, HTTPException, UploadFile
from fastapi.responses import FileResponse, JSONResponse
from datetime import datetime
from services.gpt import generate_text
from services.voicevox import audio_query, synthesis
from services.whisper import speech2text
from httpx import HTTPStatusError, RequestError

from services.gpt import generate_text
from services.tts import text2speech
from services.voicevox import audio_query, synthesis
from services.voicevox_api import get_voicevox_audio
from services.whisper import speech2text
from utils.log import upload_json_to_blob
from httpx import RequestError, HTTPStatusError
import tempfile
import os

router = APIRouter()

Expand Down
1 change: 1 addition & 0 deletions api/services/gpt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from openai import OpenAI

from utils.config import get_openai_api_key

OpenAI.api_key = get_openai_api_key()
Expand Down
4 changes: 3 additions & 1 deletion api/services/voicevox.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import json
import urllib.parse
from typing import Any, Dict

import httpx
import urllib.parse

from utils.config import get_voicevox_url

url: str = get_voicevox_url()
Expand Down
1 change: 1 addition & 0 deletions api/services/voicevox_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import httpx

from utils.config import get_voicevox_api_key

url: str = "https://deprecatedapis.tts.quest/v2/voicevox/audio/"
Expand Down
1 change: 1 addition & 0 deletions api/services/whisper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from openai import OpenAI

from utils.config import get_openai_api_key

OpenAI.api_key = get_openai_api_key()
Expand Down
8 changes: 5 additions & 3 deletions api/utils/log.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from azure.storage.blob import BlobServiceClient
from utils.config import get_storage_account_name, get_sas_token, get_is_dev_mode
import logging
import json
import logging
import time

from azure.storage.blob import BlobServiceClient

from utils.config import get_is_dev_mode, get_sas_token, get_storage_account_name

STORAGE_ACCOUNT_NAME = get_storage_account_name()
SAS_TOKEN = get_sas_token()

Expand Down

0 comments on commit 9cd06db

Please sign in to comment.