Spaces:
Runtime error
Runtime error
Ramadhiana commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
from transformers import pipeline
|
|
|
|
| 4 |
|
| 5 |
# Ganti dengan model kamu di Hugging Face
|
| 6 |
pipe = pipeline("text-classification", model="Ranti0603/job_classifier_model_v2")
|
|
@@ -25,7 +26,6 @@ with gr.Blocks() as demo:
|
|
| 25 |
chatbot=gr.Chatbot(height=400),
|
| 26 |
)
|
| 27 |
|
| 28 |
-
# 🚀 Tambahkan middleware
|
| 29 |
demo.app.add_middleware(SessionMiddleware, secret_key="kominfo_123456_aitf_prog")
|
| 30 |
|
| 31 |
if __name__ == "__main__":
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
from transformers import pipeline
|
| 4 |
+
from starlette.middleware.sessions import SessionMiddleware
|
| 5 |
|
| 6 |
# Ganti dengan model kamu di Hugging Face
|
| 7 |
pipe = pipeline("text-classification", model="Ranti0603/job_classifier_model_v2")
|
|
|
|
| 26 |
chatbot=gr.Chatbot(height=400),
|
| 27 |
)
|
| 28 |
|
|
|
|
| 29 |
demo.app.add_middleware(SessionMiddleware, secret_key="kominfo_123456_aitf_prog")
|
| 30 |
|
| 31 |
if __name__ == "__main__":
|