Spaces:
Running
Running
AMontiB
commited on
Commit
·
639b09a
1
Parent(s):
eba7b00
update
Browse files- app.py +6 -3
- requirements.txt +1 -1
- sig.txt +1 -0
app.py
CHANGED
|
@@ -130,8 +130,7 @@ with demo:
|
|
| 130 |
output_display = gr.Textbox(
|
| 131 |
label="Detection Results",
|
| 132 |
lines=15,
|
| 133 |
-
max_lines=20
|
| 134 |
-
show_copy_button=True
|
| 135 |
)
|
| 136 |
|
| 137 |
gr.Markdown("""
|
|
@@ -151,4 +150,8 @@ with demo:
|
|
| 151 |
|
| 152 |
if __name__ == "__main__":
|
| 153 |
# For HF Spaces, configure server settings
|
| 154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
output_display = gr.Textbox(
|
| 131 |
label="Detection Results",
|
| 132 |
lines=15,
|
| 133 |
+
max_lines=20
|
|
|
|
| 134 |
)
|
| 135 |
|
| 136 |
gr.Markdown("""
|
|
|
|
| 150 |
|
| 151 |
if __name__ == "__main__":
|
| 152 |
# For HF Spaces, configure server settings
|
| 153 |
+
if os.environ.get("SPACE_ID"):
|
| 154 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 155 |
+
else:
|
| 156 |
+
# Local execution
|
| 157 |
+
demo.launch()
|
requirements.txt
CHANGED
|
@@ -25,7 +25,7 @@ open-clip-torch
|
|
| 25 |
|
| 26 |
# THE FIX:
|
| 27 |
# 1. We keep Gradio high
|
| 28 |
-
gradio>=
|
| 29 |
# 2. We pin FastAPI to prevent the Pydantic 2 crash
|
| 30 |
fastapi==0.112.2
|
| 31 |
# 3. We remove the pydantic pin so WandB can install Pydantic v2 automatically
|
|
|
|
| 25 |
|
| 26 |
# THE FIX:
|
| 27 |
# 1. We keep Gradio high
|
| 28 |
+
gradio>=5.0.0
|
| 29 |
# 2. We pin FastAPI to prevent the Pydantic 2 crash
|
| 30 |
fastapi==0.112.2
|
| 31 |
# 3. We remove the pydantic pin so WandB can install Pydantic v2 automatically
|
sig.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(self, value: 'str | I18nData | Callable | None' = None, *, type: "Literal['text', 'password', 'email']" = 'text', lines: 'int' = 1, max_lines: 'int | None' = None, placeholder: 'str | I18nData | None' = None, label: 'str | I18nData | None' = None, info: 'str | I18nData | None' = None, every: 'Timer | float | None' = None, inputs: 'Component | Sequence[Component] | set[Component] | None' = None, show_label: 'bool | None' = None, container: 'bool' = True, scale: 'int | None' = None, min_width: 'int' = 160, interactive: 'bool | None' = None, visible: "bool | Literal['hidden']" = True, elem_id: 'str | None' = None, autofocus: 'bool' = False, autoscroll: 'bool' = True, elem_classes: 'list[str] | str | None' = None, render: 'bool' = True, key: 'int | str | tuple[int | str, ...] | None' = None, preserved_by_key: 'list[str] | str | None' = 'value', text_align: "Literal['left', 'right'] | None" = None, rtl: 'bool' = False, buttons: "list[Literal['copy']] | None" = None, max_length: 'int | None' = None, submit_btn: 'str | bool | None' = False, stop_btn: 'str | bool | None' = False, html_attributes: 'InputHTMLAttributes | None' = None)
|