Spaces:
Configuration error
Configuration error
File size: 1,147 Bytes
2d610a5 4b98fcb 99122b8 2d610a5 4b98fcb 2d610a5 2664b59 2d610a5 2664b59 2d610a5 99122b8 2d610a5 52a3fd6 df4965a 0cc343d 2d610a5 4b98fcb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
from django.contrib import admin
from django.urls import path, include
from .schemaprotocol import BothHttpAndHttpsSchemaGenerator
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,
# generator_class=BothHttpAndHttpsSchemaGenerator,
permission_classes=(permissions.AllowAny,),
)
urlpatterns = [
path('admin/', admin.site.urls),
path('auth/', include('accounts.urls')),
path('speech/', include('texttovoice.urls')),
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) |