Spaces:
Sleeping
Sleeping
update openai key
Browse files
app.py
CHANGED
@@ -55,7 +55,8 @@ def process_chunks(openaikeystr,inputtext):
|
|
55 |
|
56 |
# api_key=openaikeystr,
|
57 |
# )
|
58 |
-
openaiojb =OpenAI(base_url="http://localhost:1234/v1", api_key="not-needed")
|
|
|
59 |
text = inputtext
|
60 |
#openaikey.set_key(openaikeystr)
|
61 |
#print('process_chunk',openaikey.get_key())
|
@@ -180,8 +181,8 @@ def writenotes( apikeystr,inputscript):
|
|
180 |
print('ok')
|
181 |
if len(inputscript)>10:
|
182 |
transcribe_text=inputscript
|
183 |
-
|
184 |
-
|
185 |
#ainotestext=""
|
186 |
# with open('asr_resul.txt', 'w') as f:
|
187 |
# #print(transcribe_text)
|
|
|
55 |
|
56 |
# api_key=openaikeystr,
|
57 |
# )
|
58 |
+
#openaiojb =OpenAI(base_url="http://localhost:1234/v1", api_key="not-needed")
|
59 |
+
openaiojb =OpenAI( api_key=openaikeystr)
|
60 |
text = inputtext
|
61 |
#openaikey.set_key(openaikeystr)
|
62 |
#print('process_chunk',openaikey.get_key())
|
|
|
181 |
print('ok')
|
182 |
if len(inputscript)>10:
|
183 |
transcribe_text=inputscript
|
184 |
+
ainotestext=process_chunks(apikeystr,transcribe_text)
|
185 |
+
# ainotestext=inputscript
|
186 |
#ainotestext=""
|
187 |
# with open('asr_resul.txt', 'w') as f:
|
188 |
# #print(transcribe_text)
|