BlahBlah314 commited on
Commit
c1715bb
·
verified ·
1 Parent(s): 70122e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -6,6 +6,8 @@ import os
6
  RUNPOD_API = os.environ.get("RUNPOD_API")
7
  RUNPOD_ENDPOINT = os.environ.get("RUNPOD_ENDPOINT")
8
 
 
 
9
 
10
  def process_transcribe(file):
11
  audio_nparray = file[1]
@@ -22,6 +24,8 @@ def process_transcribe(file):
22
  return raw_text
23
 
24
  with gr.Blocks(theme=gr.themes.Default(primary_hue="blue")) as iface:
 
 
25
  with gr.Tab("Speech2text prescription"):
26
  with gr.Row():
27
  with gr.Column():
@@ -30,4 +34,4 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="blue")) as iface:
30
  with gr.Column():
31
  raw_transcript = gr.Textbox(label="Transcription")
32
  submit_btn.click(process_transcribe, inputs=[audio_file], outputs=[raw_transcript])
33
- iface.launch(debug=True)
 
6
  RUNPOD_API = os.environ.get("RUNPOD_API")
7
  RUNPOD_ENDPOINT = os.environ.get("RUNPOD_ENDPOINT")
8
 
9
+ def update_message(request: gr.Request):
10
+ return f"Welcome, {request.username}"
11
 
12
  def process_transcribe(file):
13
  audio_nparray = file[1]
 
24
  return raw_text
25
 
26
  with gr.Blocks(theme=gr.themes.Default(primary_hue="blue")) as iface:
27
+ m = gr.Markdown()
28
+ iface.load(update_message, None, m)
29
  with gr.Tab("Speech2text prescription"):
30
  with gr.Row():
31
  with gr.Column():
 
34
  with gr.Column():
35
  raw_transcript = gr.Textbox(label="Transcription")
36
  submit_btn.click(process_transcribe, inputs=[audio_file], outputs=[raw_transcript])
37
+ iface.launch(auth=[("Speech2sense", "s2sftw"), ("Posos", "pss1679")])