Upload folder using huggingface_hub
Browse files- .pytest_cache/.gitignore +2 -0
- .pytest_cache/CACHEDIR.TAG +4 -0
- .pytest_cache/README.md +8 -0
- .pytest_cache/v/cache/stepwise +1 -0
- app.py +6 -6
.pytest_cache/.gitignore
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
# Created by pytest automatically.
|
2 |
+
*
|
.pytest_cache/CACHEDIR.TAG
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Signature: 8a477f597d28d172789f06886806bc55
|
2 |
+
# This file is a cache directory tag created by pytest.
|
3 |
+
# For information about cache directory tags, see:
|
4 |
+
# https://bford.info/cachedir/spec.html
|
.pytest_cache/README.md
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# pytest cache directory #
|
2 |
+
|
3 |
+
This directory contains data from the pytest's cache plugin,
|
4 |
+
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
|
5 |
+
|
6 |
+
**Do not** commit this to version control.
|
7 |
+
|
8 |
+
See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information.
|
.pytest_cache/v/cache/stepwise
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
[]
|
app.py
CHANGED
@@ -204,12 +204,12 @@ def generate_image(
|
|
204 |
session_id, manager = SessionManager.get_manager(session_id)
|
205 |
manager.update_activity()
|
206 |
|
207 |
-
# Check if the user has exceeded the request limit
|
208 |
-
if manager.has_exceeded_limit(
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
|
214 |
# Add the current request timestamp
|
215 |
manager.add_request_timestamp()
|
|
|
204 |
session_id, manager = SessionManager.get_manager(session_id)
|
205 |
manager.update_activity()
|
206 |
|
207 |
+
# # Check if the user has exceeded the request limit
|
208 |
+
# if manager.has_exceeded_limit(
|
209 |
+
# limit=10): # Set the limit to 10 requests per hour
|
210 |
+
# error_message = "❌ You have exceeded the limit of 10 requests per hour. Please try again later."
|
211 |
+
# yield error_message, None, "", None
|
212 |
+
# return
|
213 |
|
214 |
# Add the current request timestamp
|
215 |
manager.add_request_timestamp()
|