NightRaven109 commited on
Commit
b58bf33
·
verified ·
1 Parent(s): 6f7187c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -33,7 +33,7 @@ def initialize_models():
33
  # Download model repository (only once)
34
  model_path = snapshot_download(
35
  repo_id="NightRaven109/CCSRModels",
36
- token=os.environ['Read2']
37
  )
38
 
39
  # Set up default arguments
@@ -257,7 +257,7 @@ with gr.Blocks(title="Texture Super-Resolution") as demo:
257
 
258
  with gr.Row():
259
  with gr.Column():
260
- input_image = gr.Image(label="Input Image")
261
 
262
  with gr.Accordion("Advanced Options", open=False):
263
  prompt = gr.Textbox(label="Prompt", value=DEFAULT_VALUES["prompt"])
@@ -278,7 +278,7 @@ with gr.Blocks(title="Texture Super-Resolution") as demo:
278
  submit_btn = gr.Button("Submit", variant="primary")
279
 
280
  with gr.Column():
281
- output_image = gr.Image(label="Generated Image", type="pil", format="png")
282
 
283
  # Add examples
284
  gr.Examples(
@@ -329,4 +329,4 @@ with gr.Blocks(title="Texture Super-Resolution") as demo:
329
  )
330
 
331
  if __name__ == "__main__":
332
- demo.launch()
 
33
  # Download model repository (only once)
34
  model_path = snapshot_download(
35
  repo_id="NightRaven109/CCSRModels",
36
+ token=os.environ.get('Read2', '') # Use get() to avoid KeyError
37
  )
38
 
39
  # Set up default arguments
 
257
 
258
  with gr.Row():
259
  with gr.Column():
260
+ input_image = gr.Image(label="Input Image", type="numpy")
261
 
262
  with gr.Accordion("Advanced Options", open=False):
263
  prompt = gr.Textbox(label="Prompt", value=DEFAULT_VALUES["prompt"])
 
278
  submit_btn = gr.Button("Submit", variant="primary")
279
 
280
  with gr.Column():
281
+ output_image = gr.Image(label="Generated Image", type="pil")
282
 
283
  # Add examples
284
  gr.Examples(
 
329
  )
330
 
331
  if __name__ == "__main__":
332
+ demo.launch()