Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -117,6 +117,7 @@ def update_features(
|
|
117 |
1) the same PIL image (so it can be displayed)
|
118 |
2) its DINO descriptor tensor, stored in a gr.State
|
119 |
"""
|
|
|
120 |
if img is None:
|
121 |
return None, None, None
|
122 |
img = resize(img, target_res=target_res, resize=True, to_pil=True)
|
@@ -244,6 +245,7 @@ with gr.Blocks() as demo:
|
|
244 |
outputs=[src,tgt]
|
245 |
)
|
246 |
|
|
|
247 |
|
248 |
if __name__ == "__main__":
|
249 |
demo.launch()
|
|
|
117 |
1) the same PIL image (so it can be displayed)
|
118 |
2) its DINO descriptor tensor, stored in a gr.State
|
119 |
"""
|
120 |
+
torch.cuda.empty_cache()
|
121 |
if img is None:
|
122 |
return None, None, None
|
123 |
img = resize(img, target_res=target_res, resize=True, to_pil=True)
|
|
|
245 |
outputs=[src,tgt]
|
246 |
)
|
247 |
|
248 |
+
# Add examples=[["What are you doing?"], ["Where should we time travel to?"]], (https://huggingface.co/learn/llm-course/chapter9/4?fw=pt)
|
249 |
|
250 |
if __name__ == "__main__":
|
251 |
demo.launch()
|