Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -372,7 +372,21 @@ def generate(
|
|
372 |
|
373 |
return output
|
374 |
|
375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
def log_messages(inputs, outputs):
|
377 |
logger(f'Input: {inputs}, Output: {outputs}')
|
378 |
|
|
|
372 |
|
373 |
return output
|
374 |
|
375 |
+
# Define input and output components
|
376 |
+
with gr.Blocks() as iface:
|
377 |
+
# Input components
|
378 |
+
input_text = gr.Textbox(label="Input Text")
|
379 |
+
# Other input components...
|
380 |
+
|
381 |
+
# Output components
|
382 |
+
output_text = gr.Textbox(label="Output Text")
|
383 |
+
# Other output components...
|
384 |
+
|
385 |
+
# Specify inputs and events
|
386 |
+
inputs = [input_text, ...] # List of input components
|
387 |
+
events = [output_text, ...] # List of output components
|
388 |
+
|
389 |
+
@gr.Interface.load(inputs, events)
|
390 |
def log_messages(inputs, outputs):
|
391 |
logger(f'Input: {inputs}, Output: {outputs}')
|
392 |
|