Chan55 commited on
Commit
1c5f093
Β·
1 Parent(s): 668de9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -10
app.py CHANGED
@@ -1,22 +1,35 @@
1
- #
2
 
3
-
4
- # openai.api_key = "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"
5
- # set_api_key("5d879e23b3f825be89038d704485ea5a")
6
  import openai
7
 
 
8
  from elevenlabs import set_api_key
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  set_api_key("198d4c1c7e0a7065e8b3c4cfdcff7a7f")
11
 
12
  openai.api_key = "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"
13
 
14
- import whisper
15
 
16
  model = whisper.load_model("base")
17
- import os
18
  os.environ['PATH'] += os.pathsep + '/path/to/mpv/'
19
- from typing import Optional
20
 
21
 
22
  class Chat:
@@ -48,9 +61,6 @@ class Chat:
48
  return response_content
49
 
50
 
51
- from elevenlabs import generate, play , stream , save
52
-
53
- import gradio as gr
54
 
55
  def read_and_print_file(file_path):
56
  with open(file_path, 'r') as file:
 
 
1
 
 
 
 
2
  import openai
3
 
4
+
5
  from elevenlabs import set_api_key
6
 
7
+
8
+ import whisper
9
+
10
+
11
+ import os
12
+
13
+
14
+ from elevenlabs import generate, play , stream , save
15
+
16
+
17
+ import gradio as gr
18
+
19
+
20
+ from typing import Optional
21
+
22
+
23
+
24
+
25
  set_api_key("198d4c1c7e0a7065e8b3c4cfdcff7a7f")
26
 
27
  openai.api_key = "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"
28
 
 
29
 
30
  model = whisper.load_model("base")
31
+
32
  os.environ['PATH'] += os.pathsep + '/path/to/mpv/'
 
33
 
34
 
35
  class Chat:
 
61
  return response_content
62
 
63
 
 
 
 
64
 
65
  def read_and_print_file(file_path):
66
  with open(file_path, 'r') as file: