Priyacodes310 commited on
Commit
5a81412
·
verified ·
1 Parent(s): 09bfa3d

Upload 2 files

Browse files
Files changed (2) hide show
  1. emotion_selector.py +6 -2
  2. soul_sync.py +1 -1
emotion_selector.py CHANGED
@@ -22,8 +22,12 @@ class EmotionSelector(gr.Component):
22
  return output_data
23
 
24
  def api_info(self):
25
- """Required method for Gradio components."""
26
- return {"type": "EmotionSelector", "description": "Custom emotion selection component"}
 
 
 
 
27
 
28
  def example_payload(self):
29
  """Required method to prevent NotImplementedError."""
 
22
  return output_data
23
 
24
  def api_info(self):
25
+ """Required method for Gradio components."""
26
+ return {
27
+ "type": "string", # Gradio expects a standard type
28
+ "description": "Custom emotion selection component",
29
+ "enum": ["joy", "anger", "sadness", "fear", "surprise", "love", "neutral", "disgust"]
30
+ }
31
 
32
  def example_payload(self):
33
  """Required method to prevent NotImplementedError."""
soul_sync.py CHANGED
@@ -101,4 +101,4 @@ with gr.Blocks(theme=gr.themes.Soft(), css=".gradio-container {background-color:
101
  clear_btn.click(fn=reset_session, outputs=journal_output)
102
 
103
  if __name__ == "__main__":
104
- demo.launch()
 
101
  clear_btn.click(fn=reset_session, outputs=journal_output)
102
 
103
  if __name__ == "__main__":
104
+ demo.launch(share=True) # Enables public access