Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -373,6 +373,7 @@ def generate(
|
|
373 |
|
374 |
return output
|
375 |
|
|
|
376 |
# Define input and output components
|
377 |
with gr.Blocks() as iface:
|
378 |
# Input components
|
@@ -387,6 +388,10 @@ with gr.Blocks() as iface:
|
|
387 |
inputs = [input_text, ...] # List of input components
|
388 |
events = [output_text, ...] # List of output components
|
389 |
|
|
|
|
|
|
|
|
|
390 |
@gr.Interface.load(inputs, events)
|
391 |
def log_messages(inputs, outputs):
|
392 |
logger(f'Input: {inputs}, Output: {outputs}')
|
|
|
373 |
|
374 |
return output
|
375 |
|
376 |
+
PYTHON
|
377 |
# Define input and output components
|
378 |
with gr.Blocks() as iface:
|
379 |
# Input components
|
|
|
388 |
inputs = [input_text, ...] # List of input components
|
389 |
events = [output_text, ...] # List of output components
|
390 |
|
391 |
+
@iface.load(inputs, events)
|
392 |
+
def log_messages(inputs, outputs):
|
393 |
+
logger(f'Input: {inputs}, Output: {outputs}')
|
394 |
+
|
395 |
@gr.Interface.load(inputs, events)
|
396 |
def log_messages(inputs, outputs):
|
397 |
logger(f'Input: {inputs}, Output: {outputs}')
|