Spaces:
Runtime error
Runtime error
Michael Benayoun
commited on
Commit
·
ea13ed5
1
Parent(s):
7d76b78
Test
Browse files- tmp_Dockerfile → Dockerfile +2 -1
- app.py +8 -1
tmp_Dockerfile → Dockerfile
RENAMED
|
@@ -11,4 +11,5 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
| 11 |
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
| 11 |
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
+
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 15 |
+
CMD ["python", "app.py"]
|
app.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
| 1 |
import os
|
|
|
|
|
|
|
|
|
|
| 2 |
import tweepy
|
| 3 |
|
| 4 |
BEARER_TOKEN = os.environ.get("BEARER_TOKEN")
|
|
@@ -17,6 +20,10 @@ client = tweepy.Client(
|
|
| 17 |
|
| 18 |
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
response = client.create_tweet(
|
| 21 |
-
text=
|
| 22 |
)
|
|
|
|
| 1 |
import os
|
| 2 |
+
import string
|
| 3 |
+
import random
|
| 4 |
+
|
| 5 |
import tweepy
|
| 6 |
|
| 7 |
BEARER_TOKEN = os.environ.get("BEARER_TOKEN")
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
+
length = 25
|
| 24 |
+
letters = string.ascii_lowercase
|
| 25 |
+
result_str = ''.join(random.choice(letters) for i in range(length))
|
| 26 |
+
|
| 27 |
response = client.create_tweet(
|
| 28 |
+
text=result_str
|
| 29 |
)
|