Spaces:
Runtime error
Runtime error
Upload 5 files
Browse files
app.py
CHANGED
|
@@ -4,8 +4,9 @@ import asyncio
|
|
| 4 |
import tempfile
|
| 5 |
|
| 6 |
import edge_tts
|
| 7 |
-
from flask import Flask, request, jsonify, send_file,
|
| 8 |
|
|
|
|
| 9 |
app = Flask(__name__)
|
| 10 |
|
| 11 |
# --- Myanmar voices available in Edge TTS ---
|
|
@@ -31,7 +32,7 @@ def clamp_pct(value, lo=-50, hi=50):
|
|
| 31 |
|
| 32 |
@app.route("/")
|
| 33 |
def index():
|
| 34 |
-
return
|
| 35 |
|
| 36 |
|
| 37 |
@app.route("/api/voices")
|
|
|
|
| 4 |
import tempfile
|
| 5 |
|
| 6 |
import edge_tts
|
| 7 |
+
from flask import Flask, request, jsonify, send_file, after_this_request
|
| 8 |
|
| 9 |
+
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 10 |
app = Flask(__name__)
|
| 11 |
|
| 12 |
# --- Myanmar voices available in Edge TTS ---
|
|
|
|
| 32 |
|
| 33 |
@app.route("/")
|
| 34 |
def index():
|
| 35 |
+
return send_file(os.path.join(BASE_DIR, "index.html"))
|
| 36 |
|
| 37 |
|
| 38 |
@app.route("/api/voices")
|