greendra commited on
Commit
aed8fa0
·
verified ·
1 Parent(s): 60f6fd1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -22,7 +22,7 @@ headers = {"Authorization": f"Bearer {API_TOKEN}"} if API_TOKEN else {}
22
  timeout = 100 # seconds for API call timeout
23
 
24
  IMAGE_DIR = "temp_generated_images" # Directory to store temporary images
25
- ARINTELLI_REDIRECT_BASE = "https://arintelli.com/app/" # Your redirector URL
26
 
27
  # --- Ensure temporary directory exists ---
28
  try:
@@ -120,13 +120,13 @@ def query(prompt, negative_prompt="", steps=4, cfg_scale=0, seed=-1, width=1024,
120
  relative_file_url = f"/gradio_api/file={save_path}"
121
 
122
  encoded_file_url = quote(relative_file_url)
123
- arintelli_url = f"{ARINTELLI_REDIRECT_BASE}?download_url={encoded_file_url}&space_name={space_name}"
124
- print(f"{arintelli_url}")
125
 
126
  # Use Gradio's primary button style for the link
127
  download_html = (
128
  f'<div style="text-align: center; margin-top: 15px;">' # Added margin-top
129
- f'<a href="{arintelli_url}" target="_blank" class="gr-button gr-button-lg gr-button-primary">'
130
  f'Download Image'
131
  f'</a>'
132
  f'</div>'
 
22
  timeout = 100 # seconds for API call timeout
23
 
24
  IMAGE_DIR = "temp_generated_images" # Directory to store temporary images
25
+ ARINTELI_REDIRECT_BASE = "https://arinteli.com/app/" # Your redirector URL
26
 
27
  # --- Ensure temporary directory exists ---
28
  try:
 
120
  relative_file_url = f"/gradio_api/file={save_path}"
121
 
122
  encoded_file_url = quote(relative_file_url)
123
+ arinteli_url = f"{ARINTELI_REDIRECT_BASE}?download_url={encoded_file_url}&space_name={space_name}"
124
+ print(f"{arinteli_url}")
125
 
126
  # Use Gradio's primary button style for the link
127
  download_html = (
128
  f'<div style="text-align: center; margin-top: 15px;">' # Added margin-top
129
+ f'<a href="{arinteli_url}" target="_blank" class="gr-button gr-button-lg gr-button-primary">'
130
  f'Download Image'
131
  f'</a>'
132
  f'</div>'