Zack Saadioui
8/27/2024
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
python
import schedule
import time
def auto_process():
# Fetch file
with dbx.files_download('/path/to/report.txt') as res:
report_content = res.content
# Process it through Ollama
report_response = llm.complete(report_content)
# Store the results back to Dropbox
dbx.files_upload(report_response.encode('utf-8'), '/path/to/output.txt', mode=dropbox.files.WriteMode('overwrite'))
print('Report processed & saved to Dropbox!')
# Schedule the task
schedule.every().day.at("09:00").do(auto_process)
while True:
schedule.run_pending()
time.sleep(1)
Copyright © Arsturn 2024