Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,6 @@ import numpy as np
|
|
| 4 |
import gradio as gr
|
| 5 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 6 |
|
| 7 |
-
# 🔹 Change this to your actual Hugging Face model repo ID
|
| 8 |
MODEL_ID = "SharvNey/capstone_project"
|
| 9 |
|
| 10 |
# Load model & tokenizer
|
|
@@ -41,8 +40,6 @@ if __name__ == "__main__":
|
|
| 41 |
in_spaces = os.environ.get("SYSTEM") == "spaces"
|
| 42 |
|
| 43 |
if in_spaces:
|
| 44 |
-
# Spaces handles public link, no share=True needed
|
| 45 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 46 |
else:
|
| 47 |
-
# Local/Colab → provide share=True for public link
|
| 48 |
demo.launch(share=True)
|
|
|
|
| 4 |
import gradio as gr
|
| 5 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 6 |
|
|
|
|
| 7 |
MODEL_ID = "SharvNey/capstone_project"
|
| 8 |
|
| 9 |
# Load model & tokenizer
|
|
|
|
| 40 |
in_spaces = os.environ.get("SYSTEM") == "spaces"
|
| 41 |
|
| 42 |
if in_spaces:
|
|
|
|
| 43 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 44 |
else:
|
|
|
|
| 45 |
demo.launch(share=True)
|