randeom commited on
Commit
333ad5e
1 Parent(s): 493188c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -6,14 +6,12 @@ import requests
6
  from io import BytesIO
7
  import re
8
 
9
- # Function to fetch the API endpoint from the URL using regular expressions
10
  def fetch_api_endpoint(url):
11
  try:
12
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}
13
  response = requests.get(url, headers=headers)
14
  response.raise_for_status() # Raise exception for HTTP errors
15
 
16
- # Use regular expressions to find the endpoint URL in the script content
17
  endpoint_match = re.search(r'root":"(https://[^"]+)', response.text)
18
  if endpoint_match:
19
  endpoint_url = endpoint_match.group(1)
@@ -134,11 +132,11 @@ with gr.Blocks(css=css) as app:
134
  with gr.Row():
135
  gr.HTML("<h2>Generated Examples</h2>")
136
  gr.Markdown("""
137
- | **Preview Image** | **Used Prompt** | **Size** | **Guidance Scale** |
138
  |-------------------|--------------------------------|-----------|--------------------|
139
- | ![Preview](https://i.imgur.com/CBvJ3sy.png) | Coffeeshop website logo | 1024x1024 | 3 |
140
- | ![Preview](https://i.imgur.com/i2XpinX.png) | Bio food website logo | 1024x1024 | 3 |
141
- | ![Preview](https://i.imgur.com/HeEjh4T.png) | Car Selling website logo | 1024x1024 | 3 |
142
  """)
143
 
144
  gr.Markdown("""
 
6
  from io import BytesIO
7
  import re
8
 
 
9
  def fetch_api_endpoint(url):
10
  try:
11
  headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}
12
  response = requests.get(url, headers=headers)
13
  response.raise_for_status() # Raise exception for HTTP errors
14
 
 
15
  endpoint_match = re.search(r'root":"(https://[^"]+)', response.text)
16
  if endpoint_match:
17
  endpoint_url = endpoint_match.group(1)
 
132
  with gr.Row():
133
  gr.HTML("<h2>Generated Examples</h2>")
134
  gr.Markdown("""
135
+ | **Preview Image** | **Used Prompt** | **width** | **height** | **Guidance Scale** | **Seed** |
136
  |-------------------|--------------------------------|-----------|--------------------|
137
+ | ![Preview](https://i.imgur.com/CBvJ3sy.png) | Coffeeshop website logo | 1024 | 1024 | 3 | 0 |
138
+ | ![Preview](https://i.imgur.com/i2XpinX.png) | Bio food website logo | 1024 | 1024 | 3 | 0 |
139
+ | ![Preview](https://i.imgur.com/HeEjh4T.png) | Car Selling website logo | 1024 | 1024 | 3 | 0 |
140
  """)
141
 
142
  gr.Markdown("""