Spaces:
Running
Running
import gradio as gr | |
import yaml | |
def load_config(config_path="config.yaml"): | |
with open(config_path, "r") as f: | |
return yaml.safe_load(f) | |
config = load_config() | |
# Example function to serve | |
def agent_interface(input_text): | |
# Use config and do something with input_text | |
return f"Processed: {input_text}" | |
# Define the Gradio app | |
iface = gr.Interface(fn=agent_interface, inputs="text", outputs="text") | |
# Launch if running directly | |
if __name__ == "__main__": | |
iface.launch() | |