Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit d86256b

Browse files
committed
Fixed bug.
1 parent 40de3fd commit d86256b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tweet.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
import tweepy
55

66
# Grab random image from daily build
7-
filename = random.choice(os.listdir("cropped/shabby/"))
7+
filename_display = random.choice(os.listdir("cropped/shabby/"))
8+
filename_upload = "cropped/shabby/" + filename_display
89

910
# Create tweet message
10-
tweet = f"ShabbyPage-Of-The-Day using lastest build of Augraphy: {filename} "
11+
tweet = f"ShabbyPage-Of-The-Day using lastest build of Augraphy: {filename_display} "
1112
tweet = tweet + "#ShabbyPages #Augraphy #ImageAugmentation #ComputerVision #OpenCV #DataAugmentation #MachineLearning #imgaug #albumentations #deeplearning #kaggle #ml #ai"
1213

1314
# Get secrets from environment
@@ -23,7 +24,7 @@
2324
logging.info(f"Authenticated with Twitter API; response = [{api}]")
2425

2526
# Upload image
26-
media = api.media_upload(filename)
27+
media = api.media_upload(filename_upload)
2728
logging.info(f"Media uploaded to twitter; response = [{media}]")
2829

2930
# Post tweet with image

0 commit comments

Comments
 (0)