Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -63,11 +63,6 @@ def summarize(diarized, summarization_pipeline):
|
|
63 |
for d in diarized:
|
64 |
text += f"\n{d[1]}: {d[0]}"
|
65 |
|
66 |
-
# inner function cached because outer function cannot be cached
|
67 |
-
@functools.lru_cache(maxsize=128)
|
68 |
-
def call_summarize_api(text):
|
69 |
-
return summarization_pipeline(text)[0]["summary_text"]
|
70 |
-
|
71 |
return call_summarize_api(text)
|
72 |
|
73 |
def sentiment(diarized, emotion_pipeline):
|
|
|
63 |
for d in diarized:
|
64 |
text += f"\n{d[1]}: {d[0]}"
|
65 |
|
|
|
|
|
|
|
|
|
|
|
66 |
return call_summarize_api(text)
|
67 |
|
68 |
def sentiment(diarized, emotion_pipeline):
|