Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,7 @@ import pandas as pd
|
|
| 10 |
from datetime import datetime, timezone, timedelta
|
| 11 |
import notion_df
|
| 12 |
import concurrent.futures
|
|
|
|
| 13 |
from nltk.tokenize import sent_tokenize
|
| 14 |
nltk.download('punkt')
|
| 15 |
|
|
@@ -75,7 +76,7 @@ def transcribe(audio, text):
|
|
| 75 |
chat_transcript += f"\n\nNumber of tokens used: {num_tokens}\n\n"
|
| 76 |
|
| 77 |
# Get the current time in Eastern Time (ET)
|
| 78 |
-
now_et = datetime.now(timezone(timedelta(hours=-
|
| 79 |
# Format the time as string (YY-MM-DD HH:MM)
|
| 80 |
published_date = now_et.strftime('%m-%d-%y %H:%M')
|
| 81 |
if counter > 0:
|
|
@@ -107,7 +108,7 @@ def transcribe(audio, text):
|
|
| 107 |
chat_transcript += f"\n\nNumber of tokens used: {num_tokens}\n\n"
|
| 108 |
df = pd.DataFrame([chat_transcript])
|
| 109 |
# Get the current time in Eastern Time (ET)
|
| 110 |
-
now_et = datetime.now(timezone(timedelta(hours=-
|
| 111 |
# Format the time as string (YY-MM-DD HH:MM)
|
| 112 |
published_date = now_et.strftime('%m-%d-%y %H:%M')
|
| 113 |
notion_df.upload(df, 'https://www.notion.so/US-62e861a0b35f43da8ef9a7789512b8c2?pvs=4', title=str(published_date), api_key=API_KEY)
|
|
|
|
| 10 |
from datetime import datetime, timezone, timedelta
|
| 11 |
import notion_df
|
| 12 |
import concurrent.futures
|
| 13 |
+
import nltk
|
| 14 |
from nltk.tokenize import sent_tokenize
|
| 15 |
nltk.download('punkt')
|
| 16 |
|
|
|
|
| 76 |
chat_transcript += f"\n\nNumber of tokens used: {num_tokens}\n\n"
|
| 77 |
|
| 78 |
# Get the current time in Eastern Time (ET)
|
| 79 |
+
now_et = datetime.now(timezone(timedelta(hours=-4)))
|
| 80 |
# Format the time as string (YY-MM-DD HH:MM)
|
| 81 |
published_date = now_et.strftime('%m-%d-%y %H:%M')
|
| 82 |
if counter > 0:
|
|
|
|
| 108 |
chat_transcript += f"\n\nNumber of tokens used: {num_tokens}\n\n"
|
| 109 |
df = pd.DataFrame([chat_transcript])
|
| 110 |
# Get the current time in Eastern Time (ET)
|
| 111 |
+
now_et = datetime.now(timezone(timedelta(hours=-4)))
|
| 112 |
# Format the time as string (YY-MM-DD HH:MM)
|
| 113 |
published_date = now_et.strftime('%m-%d-%y %H:%M')
|
| 114 |
notion_df.upload(df, 'https://www.notion.so/US-62e861a0b35f43da8ef9a7789512b8c2?pvs=4', title=str(published_date), api_key=API_KEY)
|