Spaces:
Running
Running
File size: 495 Bytes
504b3b7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
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()
|