huedaya commited on
Commit
49829de
·
1 Parent(s): b029c51
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -16,15 +16,17 @@ app = Flask(__name__)
16
  def indexApi():
17
  return jsonify({"output": "okay"})
18
 
19
- @app.route("/run")
20
  def runApi():
21
  audio_url = request.form.get("audio_url")
22
  # key = request.form.get("key")
23
  # model = request.form.get("model")
 
24
 
25
  if (modelSelection == None):
26
  modelSelection = "small"
27
  model = whisper.load_model(modelSelection)
 
28
 
29
  # # reject if key not the same
30
  # apiKey = st.secrets["Api-Key"]
 
16
  def indexApi():
17
  return jsonify({"output": "okay"})
18
 
19
+ @app.route("/run", methods=['POST'])
20
  def runApi():
21
  audio_url = request.form.get("audio_url")
22
  # key = request.form.get("key")
23
  # model = request.form.get("model")
24
+ print(audio_url)
25
 
26
  if (modelSelection == None):
27
  modelSelection = "small"
28
  model = whisper.load_model(modelSelection)
29
+ print(model)
30
 
31
  # # reject if key not the same
32
  # apiKey = st.secrets["Api-Key"]