voice-clone / config /urls.py
renator's picture
create table for text to speech and update the schemas for user creation as well
4b98fcb
raw
history blame
1.18 kB
from django.contrib import admin
from django.urls import path, include
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from django.conf import settings
from django.conf.urls.static import static
schema_view = get_schema_view(
openapi.Info(
title="Voice Clone",
default_version='v1',
description="Your API Description",
terms_of_service="https://huggingface.co/spaces/undetectable/voice-clone",
contact=openapi.Contact(email="[email protected]"),
license=openapi.License(name="Your License"),
),
public=True,
url="https://undetectable-voice-clone.hf.space/",
permission_classes=(permissions.AllowAny,),
)
from texttovoice.views import TextToSpeechCreateView
urlpatterns = [
path('admin/', admin.site.urls),
path('auth/', include('accounts.urls')),
path('generate-speech/', TextToSpeechCreateView.as_view(), name='generate-speech-create'),
path('', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)