Mudassir939 commited on
Commit
30d6fc9
·
verified ·
1 Parent(s): ad02f33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -25,8 +25,8 @@ aai.settings.api_key = ASSEMBLYAI_API_KEY
25
  # Set Google API key for Gemini model
26
  os.environ["GOOGLE_API_KEY"] = GOOGLE_API_KEY
27
 
28
- # Define a directory to save uploaded audio files in a writable location
29
- UPLOAD_FOLDER = '/tmp/uploads'
30
  os.makedirs(UPLOAD_FOLDER, exist_ok=True)
31
  app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
32
 
@@ -46,10 +46,10 @@ Remember:
46
  - Option 4 it is voice mail, make it option 4
47
  """
48
 
49
- # Home route to serve the index.html file
50
  @app.route('/')
51
  def home():
52
- return send_file('web/index.html')
53
 
54
  # API route to handle file upload, transcription, and model interaction
55
  @app.route("/api/upload", methods=["POST"])
@@ -110,7 +110,7 @@ def generate_api():
110
  # Route to serve static files
111
  @app.route('/<path:path>')
112
  def serve_static(path):
113
- return send_from_directory('web', path)
114
 
115
  # Run the Flask application
116
  if __name__ == '__main__':
 
25
  # Set Google API key for Gemini model
26
  os.environ["GOOGLE_API_KEY"] = GOOGLE_API_KEY
27
 
28
+ # Define a directory to save uploaded audio files
29
+ UPLOAD_FOLDER = 'uploads'
30
  os.makedirs(UPLOAD_FOLDER, exist_ok=True)
31
  app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
32
 
 
46
  - Option 4 it is voice mail, make it option 4
47
  """
48
 
49
+ # Home route to serve the index.html file from the root directory
50
  @app.route('/')
51
  def home():
52
+ return send_file('index.html')
53
 
54
  # API route to handle file upload, transcription, and model interaction
55
  @app.route("/api/upload", methods=["POST"])
 
110
  # Route to serve static files
111
  @app.route('/<path:path>')
112
  def serve_static(path):
113
+ return send_from_directory('.', path)
114
 
115
  # Run the Flask application
116
  if __name__ == '__main__':