Geek7 commited on
Commit
7044e4c
·
verified ·
1 Parent(s): e77fadf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -1,9 +1,9 @@
 
1
  from flask import Flask, request, jsonify, send_file
2
- from flask_cors import CORS # Import CORS
3
- from externalmod import gr_Interface_load # Import the required function for loading models
 
4
  import os
5
- from all_models import models
6
-
7
 
8
  app = Flask(__name__)
9
  CORS(app) # Enable CORS for all routes
@@ -19,9 +19,7 @@ def load_model(model_name):
19
  print(f"Error loading model: {error}")
20
  return None
21
 
22
- # Load your model here
23
- #model_name = "Yntec/Lexicon" # Change this to your actual model name
24
- #model_interface = load_model(model_name)
25
 
26
  @app.route('/predict', methods=['POST'])
27
  def predict():
 
1
+ from all_models import models
2
  from flask import Flask, request, jsonify, send_file
3
+ from flask_cors import CORS
4
+ from gradio_client import Client
5
+ from externalmod import gr_Interface_load
6
  import os
 
 
7
 
8
  app = Flask(__name__)
9
  CORS(app) # Enable CORS for all routes
 
19
  print(f"Error loading model: {error}")
20
  return None
21
 
22
+
 
 
23
 
24
  @app.route('/predict', methods=['POST'])
25
  def predict():