Adding verbose output
Browse files
app.py
CHANGED
|
@@ -8,6 +8,10 @@ from tools.final_answer import FinalAnswerTool
|
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
@tool
|
| 13 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
|
@@ -78,6 +82,8 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 78 |
|
| 79 |
final_answer = FinalAnswerTool()
|
| 80 |
|
|
|
|
|
|
|
| 81 |
MODEL_IDS = [
|
| 82 |
'https://wxknx1kg971u7k1n.us-east-1.aws.endpoints.huggingface.cloud/',
|
| 83 |
'https://jc26mwg228mkj8dw.us-east-1.aws.endpoints.huggingface.cloud/',
|
|
@@ -105,6 +111,8 @@ def get_available_model():
|
|
| 105 |
return model_url
|
| 106 |
return MODEL_IDS[0] # if all are failing, use the first model by dfault
|
| 107 |
|
|
|
|
|
|
|
| 108 |
selected_model_id = get_available_model()
|
| 109 |
|
| 110 |
model = HfApiModel(
|
|
|
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
| 11 |
+
verbose = True
|
| 12 |
+
|
| 13 |
+
if verbose: printf("Running app.py now\n")
|
| 14 |
+
|
| 15 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 16 |
@tool
|
| 17 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
|
|
|
| 82 |
|
| 83 |
final_answer = FinalAnswerTool()
|
| 84 |
|
| 85 |
+
if verbose: printf("Defining MODEL_IDS now\n")
|
| 86 |
+
|
| 87 |
MODEL_IDS = [
|
| 88 |
'https://wxknx1kg971u7k1n.us-east-1.aws.endpoints.huggingface.cloud/',
|
| 89 |
'https://jc26mwg228mkj8dw.us-east-1.aws.endpoints.huggingface.cloud/',
|
|
|
|
| 111 |
return model_url
|
| 112 |
return MODEL_IDS[0] # if all are failing, use the first model by dfault
|
| 113 |
|
| 114 |
+
if verbose: printf("Checking available models now\n")
|
| 115 |
+
|
| 116 |
selected_model_id = get_available_model()
|
| 117 |
|
| 118 |
model = HfApiModel(
|