pragnakalp commited on
Commit
c44a830
1 Parent(s): 0d9cdc0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -13,11 +13,11 @@ from transformers import AutoTokenizer, AutoModelWithLMHead
13
 
14
  ## connection with HF datasets
15
  HF_TOKEN = os.environ.get("HF_TOKEN")
16
- DATASET_NAME = "emotion_detection"
17
  DATASET_REPO_URL = f"https://huggingface.co/datasets/pragnakalp/{DATASET_NAME}"
18
  DATA_FILENAME = "emotion_detection_logs.csv"
19
  DATA_FILE = os.path.join("emotion_detection_logs", DATA_FILENAME)
20
- DATASET_REPO_ID = "pragnakalp/emotion_detection"
21
  print("is none?", HF_TOKEN is None)
22
  try:
23
  hf_hub_download(
@@ -148,7 +148,7 @@ def save_data_and_sendmail(article,results_dict,sen_list,results):
148
  """
149
  UI design for demo using gradio app
150
  """
151
- inputs = gr.Textbox(value=SENTENCES_VALUE,lines=10, label="Sentences",elem_id="inp_div")
152
  outputs = [gr.Dataframe(row_count = (2, "dynamic"), col_count=(2, "fixed"), label="Here is the Result", headers=["Input","Detected Emotion"])]
153
 
154
  demo = gr.Interface(
@@ -157,6 +157,11 @@ demo = gr.Interface(
157
  outputs,
158
  title="Emotion Detection",
159
  description="Feel free to give your feedback",
160
- css=".gradio-container {background-color: lightgray} #inp_div {background-color: #FB3D5;}"
 
 
 
 
 
161
  )
162
  demo.launch()
 
13
 
14
  ## connection with HF datasets
15
  HF_TOKEN = os.environ.get("HF_TOKEN")
16
+ DATASET_NAME = "emotion_detection_dataset"
17
  DATASET_REPO_URL = f"https://huggingface.co/datasets/pragnakalp/{DATASET_NAME}"
18
  DATA_FILENAME = "emotion_detection_logs.csv"
19
  DATA_FILE = os.path.join("emotion_detection_logs", DATA_FILENAME)
20
+ DATASET_REPO_ID = "pragnakalp/emotion_detection_dataset"
21
  print("is none?", HF_TOKEN is None)
22
  try:
23
  hf_hub_download(
 
148
  """
149
  UI design for demo using gradio app
150
  """
151
+ inputs = gr.Textbox(value=SENTENCES_VALUE,lines=3, label="Sentences",elem_id="inp_div")
152
  outputs = [gr.Dataframe(row_count = (2, "dynamic"), col_count=(2, "fixed"), label="Here is the Result", headers=["Input","Detected Emotion"])]
153
 
154
  demo = gr.Interface(
 
157
  outputs,
158
  title="Emotion Detection",
159
  description="Feel free to give your feedback",
160
+ css=".gradio-container {background-color: lightgray} #inp_div {background-color: #FB3D5;}",
161
+ article="""Provide us your [feedback](https://www.pragnakalp.com/contact/) on this demo and feel free to contact us at
162
+ [letstalk@pragnakalp.com]("mailto:letstalk@pragnakalp.com") if you want to have your own Emotion Detection system.
163
+ We will be happy to serve you for your Emotion Detection requirement. And don't forget to check out more interesting
164
+ [NLP services](https://www.pragnakalp.com/services/natural-language-processing-services/) we are offering.
165
+ <p style='text-align: center;'>Developed by :[ Pragnakalp Techlabs](https://www.pragnakalp.com)</p>"""
166
  )
167
  demo.launch()