Eriberto commited on
Commit
81240b7
β€’
1 Parent(s): fc74472

remove packages

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -2,7 +2,6 @@ import os
2
  import openai
3
  import whisper
4
  import gradio as gr
5
- from pyChatGPT import ChatGPT
6
 
7
  openai.api_key = os.environ.get('SessionToken')
8
 
@@ -70,8 +69,7 @@ def translate(audio):
70
  print("language spoken: " + transcription.language)
71
  print("transcript: " + transcription.text)
72
  print("β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”")
73
- #print("translated: " + translation.text)
74
-
75
  return transcription.text
76
 
77
  title = """
@@ -104,7 +102,7 @@ article = """
104
  <div class="footer">
105
  <p><a href="https://chat.openai.com/chat" target="_blank">chatGPT</a>
106
  by <a href="https://openai.com/" style="text-decoration: underline;" target="_blank">OpenAI</a> -
107
- Gradio Demo by πŸ€— <a href="" target="_blank">Eriberto Oliveira</a>
108
  </p>
109
  </div>
110
  """
@@ -145,7 +143,7 @@ with gr.Blocks(css=css) as demo:
145
  send_btn = gr.Button("Send my message !")
146
 
147
  with gr.Column():
148
- audio_translation = gr.Textbox(type="text",label="Whisper translation")
149
  gpt_response = gr.Textbox(type="text",label="chatGPT response")
150
 
151
  gr.HTML(article)
 
2
  import openai
3
  import whisper
4
  import gradio as gr
 
5
 
6
  openai.api_key = os.environ.get('SessionToken')
7
 
 
69
  print("language spoken: " + transcription.language)
70
  print("transcript: " + transcription.text)
71
  print("β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”")
72
+
 
73
  return transcription.text
74
 
75
  title = """
 
102
  <div class="footer">
103
  <p><a href="https://chat.openai.com/chat" target="_blank">chatGPT</a>
104
  by <a href="https://openai.com/" style="text-decoration: underline;" target="_blank">OpenAI</a> -
105
+ Gradio Demo by πŸ€— <a href="https://englishphonetics.net/" target="_blank">Eriberto Oliveira</a>
106
  </p>
107
  </div>
108
  """
 
143
  send_btn = gr.Button("Send my message !")
144
 
145
  with gr.Column():
146
+ audio_translation = gr.Textbox(type="text",label="Whisper transcription")
147
  gpt_response = gr.Textbox(type="text",label="chatGPT response")
148
 
149
  gr.HTML(article)