Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -84,15 +84,13 @@ def get_app_py_content(space_id: str) -> str:
|
|
84 |
try:
|
85 |
response = requests.get(app_py_url, headers=get_headers())
|
86 |
if response.status_code == 200:
|
87 |
-
|
88 |
-
if len(content) > 500: # ๋ด์ฉ์ 500์๋ก ์ ํํฉ๋๋ค
|
89 |
-
content = content[:497] + "..."
|
90 |
-
return content
|
91 |
else:
|
92 |
return f"app.py file not found or inaccessible for space: {space_id}"
|
93 |
except requests.RequestException:
|
94 |
return f"Error fetching app.py content for space: {space_id}"
|
95 |
|
|
|
96 |
def get_space_structure(space_id: str) -> Dict:
|
97 |
try:
|
98 |
# space_id์์ owner์ repo_name์ ๋ถ๋ฆฌ
|
@@ -247,6 +245,10 @@ def create_ui():
|
|
247 |
overflow: auto !important;
|
248 |
max-height: 400px !important;
|
249 |
}
|
|
|
|
|
|
|
|
|
250 |
"""
|
251 |
|
252 |
with gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as demo:
|
@@ -277,8 +279,8 @@ def create_ui():
|
|
277 |
with gr.Group(elem_classes="output-group scroll-lock"):
|
278 |
usage_guide = gr.Textbox(label="์ ํ ์๋น์ค ํน์ง ๋ฐ ์ฌ์ฉ๋ฒ", elem_id="usage-guide", visible=False, lines=20, max_lines=30)
|
279 |
|
280 |
-
with gr.Group(elem_classes="output-group
|
281 |
-
app_py_content = gr.Code(language="python", label="๋ฉ์ธ ์์ค์ฝ๋", elem_id="app-py-content", lines=
|
282 |
|
283 |
open_space_button = gr.Button("์ ํํ Space ์ด๊ธฐ", elem_id="open-space-button")
|
284 |
|
|
|
84 |
try:
|
85 |
response = requests.get(app_py_url, headers=get_headers())
|
86 |
if response.status_code == 200:
|
87 |
+
return response.text # ์ ์ฒด ๋ด์ฉ์ ๋ฐํ
|
|
|
|
|
|
|
88 |
else:
|
89 |
return f"app.py file not found or inaccessible for space: {space_id}"
|
90 |
except requests.RequestException:
|
91 |
return f"Error fetching app.py content for space: {space_id}"
|
92 |
|
93 |
+
|
94 |
def get_space_structure(space_id: str) -> Dict:
|
95 |
try:
|
96 |
# space_id์์ owner์ repo_name์ ๋ถ๋ฆฌ
|
|
|
245 |
overflow: auto !important;
|
246 |
max-height: 400px !important;
|
247 |
}
|
248 |
+
.full-height {
|
249 |
+
height: auto !important;
|
250 |
+
max-height: none !important;
|
251 |
+
}
|
252 |
"""
|
253 |
|
254 |
with gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as demo:
|
|
|
279 |
with gr.Group(elem_classes="output-group scroll-lock"):
|
280 |
usage_guide = gr.Textbox(label="์ ํ ์๋น์ค ํน์ง ๋ฐ ์ฌ์ฉ๋ฒ", elem_id="usage-guide", visible=False, lines=20, max_lines=30)
|
281 |
|
282 |
+
with gr.Group(elem_classes="output-group full-height"):
|
283 |
+
app_py_content = gr.Code(language="python", label="๋ฉ์ธ ์์ค์ฝ๋", elem_id="app-py-content", lines=None, max_lines=None)
|
284 |
|
285 |
open_space_button = gr.Button("์ ํํ Space ์ด๊ธฐ", elem_id="open-space-button")
|
286 |
|