mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-07-06 11:47:48 +02:00
fix(build):
This commit is contained in:
@@ -5,7 +5,6 @@ import re
|
|||||||
import httpx
|
import httpx
|
||||||
import matplotlib
|
import matplotlib
|
||||||
|
|
||||||
matplotlib.use("Agg")
|
|
||||||
import matplotlib.pyplot as plt # noqa: E402
|
import matplotlib.pyplot as plt # noqa: E402
|
||||||
from cache_to_disk import cache_to_disk
|
from cache_to_disk import cache_to_disk
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
@@ -56,7 +55,7 @@ def generate_image(prompt: str, variant: int = 0) -> bytes:
|
|||||||
# Sanitize prompt: replace non-renderable whitespace characters (tabs, etc.)
|
# Sanitize prompt: replace non-renderable whitespace characters (tabs, etc.)
|
||||||
# with spaces to avoid matplotlib UserWarning about missing glyphs.
|
# with spaces to avoid matplotlib UserWarning about missing glyphs.
|
||||||
prompt = re.sub(r"[\t\r\x0b\x0c]", " ", prompt)
|
prompt = re.sub(r"[\t\r\x0b\x0c]", " ", prompt)
|
||||||
|
matplotlib.use("Agg")
|
||||||
# Create a matplotlib figure
|
# Create a matplotlib figure
|
||||||
fig, ax = plt.subplots(figsize=(6, 4))
|
fig, ax = plt.subplots(figsize=(6, 4))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user