Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,11 +8,10 @@ import os
|
|
8 |
from wordcloud import WordCloud
|
9 |
import gradio as gr
|
10 |
|
11 |
-
gr.load("models/Dmyadav2001/Sentimental-Analysis").launch()
|
12 |
|
13 |
# Function to analyze sentiment using the custom Hugging Face pipeline
|
14 |
def analyze_sentiment_hf(text):
|
15 |
-
hf_pipeline = pipeline("sentiment-analysis"
|
16 |
if len(text) > 512:
|
17 |
text = text[:511]
|
18 |
sentiment_result = hf_pipeline(text)
|
|
|
8 |
from wordcloud import WordCloud
|
9 |
import gradio as gr
|
10 |
|
|
|
11 |
|
12 |
# Function to analyze sentiment using the custom Hugging Face pipeline
|
13 |
def analyze_sentiment_hf(text):
|
14 |
+
hf_pipeline = pipeline("sentiment-analysis")
|
15 |
if len(text) > 512:
|
16 |
text = text[:511]
|
17 |
sentiment_result = hf_pipeline(text)
|