Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
import os
|
| 4 |
import subprocess
|
| 5 |
from huggingface_hub import InferenceClient
|
|
@@ -293,17 +291,17 @@ class Pypelyne:
|
|
| 293 |
|
| 294 |
pypelyne = Pypelyne()
|
| 295 |
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
|
| 306 |
-
|
| 307 |
# Create a Flask app
|
| 308 |
app = Flask(__name__)
|
| 309 |
|
|
@@ -419,4 +417,4 @@ pypelyne = Pypelyne()
|
|
| 419 |
app.run(debug=True)
|
| 420 |
|
| 421 |
if __name__ == "__main__":
|
| 422 |
-
main()
|
|
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
import subprocess
|
| 3 |
from huggingface_hub import InferenceClient
|
|
|
|
| 291 |
|
| 292 |
pypelyne = Pypelyne()
|
| 293 |
|
| 294 |
+
def create_agent(name: str, agent_type: str, complexity: int) -> Agent:
|
| 295 |
+
agent = Agent(name, agent_type, complexity)
|
| 296 |
+
pypelyne.add_agent(agent)
|
| 297 |
+
return agent
|
| 298 |
|
| 299 |
+
def create_tool(name: str, tool_type: str) -> Tool:
|
| 300 |
+
tool = Tool(name, tool_type)
|
| 301 |
+
pypelyne.add_tool(tool)
|
| 302 |
+
return tool
|
| 303 |
|
| 304 |
+
def main():
|
| 305 |
# Create a Flask app
|
| 306 |
app = Flask(__name__)
|
| 307 |
|
|
|
|
| 417 |
app.run(debug=True)
|
| 418 |
|
| 419 |
if __name__ == "__main__":
|
| 420 |
+
main()
|