Update app.py
Browse files
app.py
CHANGED
|
@@ -11,11 +11,12 @@ def generate_numbers():
|
|
| 11 |
# Function to utilize full CPU using multiprocessing
|
| 12 |
def cpu_intensive_task():
|
| 13 |
with multiprocessing.Pool() as pool:
|
| 14 |
-
pool.map(print, range(
|
| 15 |
|
| 16 |
# Gradio Interface
|
| 17 |
def gradio_interface():
|
| 18 |
return generate_numbers()
|
|
|
|
| 19 |
|
| 20 |
# Updated Gradio Interface
|
| 21 |
demo = gr.Interface(
|
|
|
|
| 11 |
# Function to utilize full CPU using multiprocessing
|
| 12 |
def cpu_intensive_task():
|
| 13 |
with multiprocessing.Pool() as pool:
|
| 14 |
+
pool.map(print, range(100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)) # Distribute print task over available CPU cores
|
| 15 |
|
| 16 |
# Gradio Interface
|
| 17 |
def gradio_interface():
|
| 18 |
return generate_numbers()
|
| 19 |
+
share = True
|
| 20 |
|
| 21 |
# Updated Gradio Interface
|
| 22 |
demo = gr.Interface(
|