Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,12 +11,7 @@ import matplotlib.pyplot as plt
|
|
| 11 |
#import scipy
|
| 12 |
import csv
|
| 13 |
import sys
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
# Increase the CSV field size limit to a large value (e.g., 10^6)
|
| 18 |
-
csv.field_size_limit(10**6)
|
| 19 |
-
|
| 20 |
|
| 21 |
# Load the Stable Diffusion model for text-to-image generation and inpainting
|
| 22 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
@@ -33,10 +28,6 @@ else:
|
|
| 33 |
"runwayml/stable-diffusion-inpainting"
|
| 34 |
).to(device)
|
| 35 |
|
| 36 |
-
|
| 37 |
-
import csv
|
| 38 |
-
import sys
|
| 39 |
-
import os
|
| 40 |
# Get the current working directory
|
| 41 |
CURRENT_DIR = os.getcwd()
|
| 42 |
|
|
@@ -343,7 +334,8 @@ with gr.Blocks() as demo:
|
|
| 343 |
inputs=[obj_file, texture_file],
|
| 344 |
outputs=display, # Specify the output component
|
| 345 |
fn=load_example, # Specify the function to load the example
|
| 346 |
-
label="Example Files"
|
|
|
|
| 347 |
)
|
| 348 |
|
| 349 |
demo.launch(debug=True)
|
|
|
|
| 11 |
#import scipy
|
| 12 |
import csv
|
| 13 |
import sys
|
| 14 |
+
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# Load the Stable Diffusion model for text-to-image generation and inpainting
|
| 17 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
| 28 |
"runwayml/stable-diffusion-inpainting"
|
| 29 |
).to(device)
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
# Get the current working directory
|
| 32 |
CURRENT_DIR = os.getcwd()
|
| 33 |
|
|
|
|
| 334 |
inputs=[obj_file, texture_file],
|
| 335 |
outputs=display, # Specify the output component
|
| 336 |
fn=load_example, # Specify the function to load the example
|
| 337 |
+
label="Example Files",
|
| 338 |
+
cache_examples=False # Disable caching
|
| 339 |
)
|
| 340 |
|
| 341 |
demo.launch(debug=True)
|