KangLiao commited on
Commit
a778fea
·
1 Parent(s): 06869b4
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -111,8 +111,8 @@ def camera_understanding(image_src, question, seed, progress=gr.Progress(track_t
111
  @spaces.GPU(duration=120) # Specify a duration to avoid timeout
112
  def generate_image(prompt_scene,
113
  seed=42,
114
- roll=3,
115
- pitch=1.0,
116
  fov=1.0,
117
  progress=gr.Progress(track_tqdm=True)):
118
  # Clear CUDA cache and avoid tracking gradients
@@ -134,6 +134,7 @@ def generate_image(prompt_scene,
134
  cam_map = cam_map / (math.pi / 2)
135
 
136
  prompt = prompt_scene + " " + prompt_camera
 
137
 
138
  bsz = 4
139
  with torch.no_grad():
@@ -175,7 +176,7 @@ with gr.Blocks(css=css) as demo:
175
  roll = gr.Slider(minimum=-0.7854, maximum=0.7854, value=0.1000, step=0.1000, label="roll value")
176
  pitch = gr.Slider(minimum=-0.7854, maximum=0.7854, value=-0.1000, step=0.1000, label="pitch value")
177
  fov = gr.Slider(minimum=0.3491, maximum=1.8326, value=1.5000, step=0.1000, label="fov value")
178
- seed_input = gr.Number(label="Seed (Optional)", precision=0, value=1234)
179
 
180
  generation_button = gr.Button("Generate Images")
181
 
 
111
  @spaces.GPU(duration=120) # Specify a duration to avoid timeout
112
  def generate_image(prompt_scene,
113
  seed=42,
114
+ roll=0.1,
115
+ pitch=0.1,
116
  fov=1.0,
117
  progress=gr.Progress(track_tqdm=True)):
118
  # Clear CUDA cache and avoid tracking gradients
 
134
  cam_map = cam_map / (math.pi / 2)
135
 
136
  prompt = prompt_scene + " " + prompt_camera
137
+ print("prompt:", prompt)
138
 
139
  bsz = 4
140
  with torch.no_grad():
 
176
  roll = gr.Slider(minimum=-0.7854, maximum=0.7854, value=0.1000, step=0.1000, label="roll value")
177
  pitch = gr.Slider(minimum=-0.7854, maximum=0.7854, value=-0.1000, step=0.1000, label="pitch value")
178
  fov = gr.Slider(minimum=0.3491, maximum=1.8326, value=1.5000, step=0.1000, label="fov value")
179
+ seed_input = gr.Number(label="Seed (Optional)", precision=0, value=42)
180
 
181
  generation_button = gr.Button("Generate Images")
182