Spaces:
Sleeping
Sleeping
Rename blueprints/inference.py to blueprints/summarize.py
Browse files
blueprints/{inference.py → summarize.py}
RENAMED
|
@@ -5,7 +5,7 @@ from transformers import pipeline
|
|
| 5 |
from huggingface_hub import HfFolder
|
| 6 |
|
| 7 |
# Define the Blueprint
|
| 8 |
-
inference_bp = Blueprint('
|
| 9 |
|
| 10 |
# Global cache to store the loaded model in memory
|
| 11 |
# This prevents reloading the model on every single request
|
|
@@ -80,7 +80,7 @@ def run_inference_logic(config):
|
|
| 80 |
@inference_bp.route('/', methods=['GET'])
|
| 81 |
def index():
|
| 82 |
"""Renders the UI."""
|
| 83 |
-
return render_template('
|
| 84 |
|
| 85 |
@inference_bp.route('/api/summarize', methods=['POST'])
|
| 86 |
def api_summarize():
|
|
|
|
| 5 |
from huggingface_hub import HfFolder
|
| 6 |
|
| 7 |
# Define the Blueprint
|
| 8 |
+
inference_bp = Blueprint('summarize', __name__)
|
| 9 |
|
| 10 |
# Global cache to store the loaded model in memory
|
| 11 |
# This prevents reloading the model on every single request
|
|
|
|
| 80 |
@inference_bp.route('/', methods=['GET'])
|
| 81 |
def index():
|
| 82 |
"""Renders the UI."""
|
| 83 |
+
return render_template('sum_inference.html')
|
| 84 |
|
| 85 |
@inference_bp.route('/api/summarize', methods=['POST'])
|
| 86 |
def api_summarize():
|