Spaces:
Running
Running
oceansweep
commited on
Commit
•
46119b6
1
Parent(s):
adf0f37
Update app.py
Browse files
app.py
CHANGED
@@ -1106,8 +1106,6 @@ def summarize_chunks(api_name: str, api_key: str, transcript: List[dict], chunk_
|
|
1106 |
######### Token-size Chunking ######### FIXME - OpenAI only currently
|
1107 |
# This is dirty and shameful and terrible. It should be replaced with a proper implementation.
|
1108 |
# anyways lets get to it....
|
1109 |
-
api_key = openai_api_key
|
1110 |
-
client = OpenAI(api_key)
|
1111 |
|
1112 |
|
1113 |
def get_chat_completion(messages, model='gpt-4-turbo'):
|
@@ -3086,7 +3084,9 @@ def main(input_path, api_name=None, api_key=None,
|
|
3086 |
|
3087 |
if rolling_summarization:
|
3088 |
logging.info("MAIN: Rolling Summarization")
|
3089 |
-
|
|
|
|
|
3090 |
# Extract the text from the segments
|
3091 |
text = extract_text_from_segments(segments)
|
3092 |
|
|
|
1106 |
######### Token-size Chunking ######### FIXME - OpenAI only currently
|
1107 |
# This is dirty and shameful and terrible. It should be replaced with a proper implementation.
|
1108 |
# anyways lets get to it....
|
|
|
|
|
1109 |
|
1110 |
|
1111 |
def get_chat_completion(messages, model='gpt-4-turbo'):
|
|
|
3084 |
|
3085 |
if rolling_summarization:
|
3086 |
logging.info("MAIN: Rolling Summarization")
|
3087 |
+
api_key = openai_api_key
|
3088 |
+
global client
|
3089 |
+
client = OpenAI(api_key)
|
3090 |
# Extract the text from the segments
|
3091 |
text = extract_text_from_segments(segments)
|
3092 |
|