Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -210,13 +210,15 @@ def create_ui():
|
|
210 |
max-height: calc((100vh - 200px) / 2) !important;
|
211 |
}
|
212 |
.full-height {
|
213 |
-
height: calc(
|
214 |
overflow-y: auto !important;
|
215 |
}
|
216 |
.code-box {
|
217 |
overflow-x: auto !important;
|
|
|
218 |
white-space: pre !important;
|
219 |
word-wrap: normal !important;
|
|
|
220 |
}
|
221 |
.code-box > div {
|
222 |
min-width: 100% !important;
|
@@ -284,14 +286,14 @@ def create_ui():
|
|
284 |
app_py_content = gr.Code(
|
285 |
language="python",
|
286 |
label="app.py",
|
287 |
-
lines=
|
288 |
elem_classes="full-height code-box"
|
289 |
)
|
290 |
requirements_tab = gr.TabItem("requirements.txt")
|
291 |
with requirements_tab:
|
292 |
-
|
293 |
label="requirements.txt",
|
294 |
-
lines=
|
295 |
elem_classes="full-height code-box"
|
296 |
)
|
297 |
|
@@ -316,7 +318,6 @@ def create_ui():
|
|
316 |
gr.Examples(examples, inputs=msg)
|
317 |
|
318 |
def respond_wrapper(message, chat_history, max_tokens, temperature, top_p):
|
319 |
-
|
320 |
bot_message = respond(message, chat_history, max_tokens, temperature, top_p)
|
321 |
chat_history.append({"role": "user", "content": message})
|
322 |
chat_history.append({"role": "assistant", "content": bot_message})
|
@@ -348,9 +349,6 @@ def create_ui():
|
|
348 |
print(traceback.format_exc())
|
349 |
raise
|
350 |
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
if __name__ == "__main__":
|
355 |
try:
|
356 |
print("Starting HuggingFace Space Analyzer...")
|
@@ -374,4 +372,4 @@ if __name__ == "__main__":
|
|
374 |
print(f"Error in main: {str(e)}")
|
375 |
print("Detailed error information:")
|
376 |
print(traceback.format_exc())
|
377 |
-
raise
|
|
|
210 |
max-height: calc((100vh - 200px) / 2) !important;
|
211 |
}
|
212 |
.full-height {
|
213 |
+
height: calc(200em * 1.2) !important;
|
214 |
overflow-y: auto !important;
|
215 |
}
|
216 |
.code-box {
|
217 |
overflow-x: auto !important;
|
218 |
+
overflow-y: auto !important;
|
219 |
white-space: pre !important;
|
220 |
word-wrap: normal !important;
|
221 |
+
height: 100% !important;
|
222 |
}
|
223 |
.code-box > div {
|
224 |
min-width: 100% !important;
|
|
|
286 |
app_py_content = gr.Code(
|
287 |
language="python",
|
288 |
label="app.py",
|
289 |
+
lines=200,
|
290 |
elem_classes="full-height code-box"
|
291 |
)
|
292 |
requirements_tab = gr.TabItem("requirements.txt")
|
293 |
with requirements_tab:
|
294 |
+
requirements_content = gr.Textbox(
|
295 |
label="requirements.txt",
|
296 |
+
lines=200,
|
297 |
elem_classes="full-height code-box"
|
298 |
)
|
299 |
|
|
|
318 |
gr.Examples(examples, inputs=msg)
|
319 |
|
320 |
def respond_wrapper(message, chat_history, max_tokens, temperature, top_p):
|
|
|
321 |
bot_message = respond(message, chat_history, max_tokens, temperature, top_p)
|
322 |
chat_history.append({"role": "user", "content": message})
|
323 |
chat_history.append({"role": "assistant", "content": bot_message})
|
|
|
349 |
print(traceback.format_exc())
|
350 |
raise
|
351 |
|
|
|
|
|
|
|
352 |
if __name__ == "__main__":
|
353 |
try:
|
354 |
print("Starting HuggingFace Space Analyzer...")
|
|
|
372 |
print(f"Error in main: {str(e)}")
|
373 |
print("Detailed error information:")
|
374 |
print(traceback.format_exc())
|
375 |
+
raise
|