ginipick commited on
Commit
f90e879
ยท
verified ยท
1 Parent(s): 95bb429

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
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
- content = response.text
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 scroll-lock"):
281
- app_py_content = gr.Code(language="python", label="๋ฉ”์ธ ์†Œ์Šค์ฝ”๋“œ", elem_id="app-py-content", lines=30, max_lines=None)
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