music_agent / app.py
ubiodee's picture
Create app.py
504b3b7 verified
raw
history blame contribute delete
495 Bytes
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()