Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,25 +34,17 @@ alfred = CodeAgent(
|
|
| 34 |
planning_interval=10
|
| 35 |
)
|
| 36 |
|
|
|
|
|
|
|
| 37 |
with demo:
|
| 38 |
-
gr.Interface(
|
| 39 |
fn=alfred,
|
| 40 |
inputs="text",
|
| 41 |
outputs="text",
|
| 42 |
title="Frugalize it!",
|
| 43 |
examples=["What are you capable of ?", "Here is my code, {code}, please give me frugal alternatives"],
|
| 44 |
description="Share your Python code with this AI agent! It will track its CO2 emissions using CodeCarbon and recommend greener, frugal AI alternatives.")
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
with gr.Row():
|
| 48 |
-
text_input = gr.Textbox()
|
| 49 |
-
text_output = gr.Textbox()
|
| 50 |
-
text_button = gr.Button("Flip")
|
| 51 |
-
with gr.TabItem("Flip Image"):
|
| 52 |
-
with gr.Row():
|
| 53 |
-
image_input = gr.Image()
|
| 54 |
-
image_output = gr.Image()
|
| 55 |
-
image_button = gr.Button("Flip")
|
| 56 |
-
|
| 57 |
if __name__ == "__main__":
|
| 58 |
demo.launch(mcp_server=True, share=True)
|
|
|
|
| 34 |
planning_interval=10
|
| 35 |
)
|
| 36 |
|
| 37 |
+
demo = gr.Blocks()
|
| 38 |
+
|
| 39 |
with demo:
|
| 40 |
+
hello=gr.Interface(
|
| 41 |
fn=alfred,
|
| 42 |
inputs="text",
|
| 43 |
outputs="text",
|
| 44 |
title="Frugalize it!",
|
| 45 |
examples=["What are you capable of ?", "Here is my code, {code}, please give me frugal alternatives"],
|
| 46 |
description="Share your Python code with this AI agent! It will track its CO2 emissions using CodeCarbon and recommend greener, frugal AI alternatives.")
|
| 47 |
+
image = gr.Image(Image.open("frugal.jpg"))
|
| 48 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
if __name__ == "__main__":
|
| 50 |
demo.launch(mcp_server=True, share=True)
|