Spaces:
Running
Running
Refactor app.py: Remove PRO_ONLY_MODELS and simplify model info update logic
Browse files
app.py
CHANGED
|
@@ -30,7 +30,6 @@ from config.settings import (
|
|
| 30 |
EMBEDDING_MODEL,
|
| 31 |
HF_TOKEN,
|
| 32 |
MODELS,
|
| 33 |
-
PRO_ONLY_MODELS,
|
| 34 |
IS_PRO_ACCOUNT
|
| 35 |
)
|
| 36 |
|
|
@@ -764,12 +763,7 @@ def update_model_info(model_key):
|
|
| 764 |
return "Model not found"
|
| 765 |
|
| 766 |
model = MODELS[model_key]
|
| 767 |
-
account_status = "
|
| 768 |
-
is_pro_model = model_key in PRO_ONLY_MODELS
|
| 769 |
-
|
| 770 |
-
warning = ""
|
| 771 |
-
if is_pro_model and not IS_PRO_ACCOUNT:
|
| 772 |
-
warning = "\n\n⚠️ **Warning:** This model requires PRO account. Some features may be limited."
|
| 773 |
|
| 774 |
return f"""
|
| 775 |
### Current Model: {model['name']}
|
|
@@ -777,7 +771,7 @@ def update_model_info(model_key):
|
|
| 777 |
**Account Type:** {account_status}
|
| 778 |
**Model ID:** {model['id']}
|
| 779 |
**Description:** {model['description']}
|
| 780 |
-
**Type:** {model['type']}
|
| 781 |
"""
|
| 782 |
|
| 783 |
def get_model_details_html(model_key):
|
|
|
|
| 30 |
EMBEDDING_MODEL,
|
| 31 |
HF_TOKEN,
|
| 32 |
MODELS,
|
|
|
|
| 33 |
IS_PRO_ACCOUNT
|
| 34 |
)
|
| 35 |
|
|
|
|
| 763 |
return "Model not found"
|
| 764 |
|
| 765 |
model = MODELS[model_key]
|
| 766 |
+
account_status = "FREE"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 767 |
|
| 768 |
return f"""
|
| 769 |
### Current Model: {model['name']}
|
|
|
|
| 771 |
**Account Type:** {account_status}
|
| 772 |
**Model ID:** {model['id']}
|
| 773 |
**Description:** {model['description']}
|
| 774 |
+
**Type:** {model['type']}
|
| 775 |
"""
|
| 776 |
|
| 777 |
def get_model_details_html(model_key):
|