Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -286,7 +286,7 @@ def launch_app(self):
|
|
286 |
demo = self.build_app()
|
287 |
demo.launch()
|
288 |
|
289 |
-
|
290 |
self._print_welcome_message()
|
291 |
|
292 |
while True:
|
@@ -309,14 +309,15 @@ def launch_app(self):
|
|
309 |
except Exception as e:
|
310 |
print(f"An error occurred: {str(e)}")
|
311 |
|
312 |
-
|
313 |
print("Welcome to the Python App Builder!")
|
314 |
print("Type 'help' to see the available commands.")
|
315 |
print("Type 'launch' to build and launch the Gradio app.")
|
316 |
print("Type 'exit' to quit the application.")
|
317 |
print("-" * 50)
|
318 |
|
319 |
-
|
|
|
320 |
return input("Enter input: ").strip()
|
321 |
|
322 |
def _display_output(self, output, system_message):
|
@@ -324,7 +325,6 @@ def launch_app(self):
|
|
324 |
print(output)
|
325 |
if system_message:
|
326 |
print(system_message)
|
327 |
-
|
328 |
# The main function remains outside the class
|
329 |
def main():
|
330 |
try:
|
|
|
286 |
demo = self.build_app()
|
287 |
demo.launch()
|
288 |
|
289 |
+
def run(self):
|
290 |
self._print_welcome_message()
|
291 |
|
292 |
while True:
|
|
|
309 |
except Exception as e:
|
310 |
print(f"An error occurred: {str(e)}")
|
311 |
|
312 |
+
def _print_welcome_message(self):
|
313 |
print("Welcome to the Python App Builder!")
|
314 |
print("Type 'help' to see the available commands.")
|
315 |
print("Type 'launch' to build and launch the Gradio app.")
|
316 |
print("Type 'exit' to quit the application.")
|
317 |
print("-" * 50)
|
318 |
|
319 |
+
|
320 |
+
def _get_user_input(self):
|
321 |
return input("Enter input: ").strip()
|
322 |
|
323 |
def _display_output(self, output, system_message):
|
|
|
325 |
print(output)
|
326 |
if system_message:
|
327 |
print(system_message)
|
|
|
328 |
# The main function remains outside the class
|
329 |
def main():
|
330 |
try:
|