Spaces:
Runtime error
Runtime error
Leonardo
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,6 +23,7 @@ from scripts.text_web_browser import (
|
|
| 23 |
)
|
| 24 |
from scripts.visual_qa import visualizer
|
| 25 |
from scripts.text_cleaner_tool import TextCleanerTool
|
|
|
|
| 26 |
|
| 27 |
from smolagents import (
|
| 28 |
CodeAgent,
|
|
@@ -161,7 +162,6 @@ class ModelManager:
|
|
| 161 |
device_map="auto",
|
| 162 |
max_new_tokens=1000,
|
| 163 |
)
|
| 164 |
-
|
| 165 |
|
| 166 |
else:
|
| 167 |
raise ValueError(f"Invalid inference type: {chosen_inference}")
|
|
@@ -210,7 +210,7 @@ class ToolRegistry:
|
|
| 210 |
)
|
| 211 |
except Exception as e:
|
| 212 |
print(f"✗ Couldn't initialize image generation tool: {e}")
|
| 213 |
-
|
| 214 |
|
| 215 |
|
| 216 |
# ------------------------ Agent Creation and Execution ------------------------
|
|
@@ -650,4 +650,3 @@ def main():
|
|
| 650 |
|
| 651 |
if __name__ == "__main__":
|
| 652 |
main()
|
| 653 |
-
|
|
|
|
| 23 |
)
|
| 24 |
from scripts.visual_qa import visualizer
|
| 25 |
from scripts.text_cleaner_tool import TextCleanerTool
|
| 26 |
+
from scripts.flux_lora_tool import FluxLoRATool
|
| 27 |
|
| 28 |
from smolagents import (
|
| 29 |
CodeAgent,
|
|
|
|
| 162 |
device_map="auto",
|
| 163 |
max_new_tokens=1000,
|
| 164 |
)
|
|
|
|
| 165 |
|
| 166 |
else:
|
| 167 |
raise ValueError(f"Invalid inference type: {chosen_inference}")
|
|
|
|
| 210 |
)
|
| 211 |
except Exception as e:
|
| 212 |
print(f"✗ Couldn't initialize image generation tool: {e}")
|
| 213 |
+
return FluxLoRATool
|
| 214 |
|
| 215 |
|
| 216 |
# ------------------------ Agent Creation and Execution ------------------------
|
|
|
|
| 650 |
|
| 651 |
if __name__ == "__main__":
|
| 652 |
main()
|
|
|