chen-luke commited on
Commit
f0640f6
·
1 Parent(s): 9e1df08

removed extra function call

Browse files
Files changed (1) hide show
  1. app.py +1 -14
app.py CHANGED
@@ -23,23 +23,10 @@ def sentiment_analysis(text: str) -> str:
23
 
24
  return json.dumps(result)
25
 
26
- def test(text: str) -> str:
27
- """
28
- Analyze the sentiment of the given text.
29
-
30
- Args:
31
- text (str): The text to analyze
32
-
33
- Returns:
34
- str: A JSON string containing polarity, subjectivity, and assessment
35
- """
36
-
37
- return "hello " + text
38
-
39
  # Create the Gradio interface
40
  demo = gr.Interface(
41
  fn=sentiment_analysis,
42
- inputs=[gr.Textbox(placeholder="Enter text to analyze..."), gr.Textbox(placeholder="test input...")],
43
  outputs=gr.Textbox(), # Changed from gr.JSON() to gr.Textbox()
44
  title="Text Sentiment Analysis",
45
  description="Analyze the sentiment of text using TextBlob"
 
23
 
24
  return json.dumps(result)
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  # Create the Gradio interface
27
  demo = gr.Interface(
28
  fn=sentiment_analysis,
29
+ inputs=gr.Textbox(placeholder="Enter text to analyze..."),
30
  outputs=gr.Textbox(), # Changed from gr.JSON() to gr.Textbox()
31
  title="Text Sentiment Analysis",
32
  description="Analyze the sentiment of text using TextBlob"