Roseco-crs commited on
Commit
306b3d4
·
1 Parent(s): f9447c2

New update to address the red error occurred on Huggingface's Spaces

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -2,23 +2,19 @@ from ailab_crs import NLP_tasks_crs, Prompt_engineering_crs
2
  import gradio as gr
3
  from googletrans import LANGUAGES
4
 
5
-
6
-
7
-
8
 
9
  nlp_tasks = NLP_tasks_crs()
10
  supported_langs = list(LANGUAGES.values())
11
 
12
- with gr.Blocks() as demo:
13
- gr.Markdown("# 🧠 NaanAI 💡")
14
 
15
  with gr.Row():
16
  with gr.Column():
17
  text = gr.Textbox(label="Your Query", lines=8)
18
  with gr.Column():
19
- with gr.Accordion("Other Parameters (For Translation or Summarization Tasks)", open= True):
20
- # language = gr.Textbox(label="Language")
21
- language = gr.Dropdown(choices=supported_langs, label="Select Target Language", value="english")
22
  style = gr.Textbox(label="Choose Your Style", value="polite")
23
 
24
  with gr.Row(scale=5):
@@ -54,7 +50,6 @@ with gr.Blocks() as demo:
54
  outputs=answer
55
  )
56
 
57
-
58
 
59
  if __name__ == "__main__":
60
- demo.launch()
 
2
  import gradio as gr
3
  from googletrans import LANGUAGES
4
 
 
 
 
5
 
6
  nlp_tasks = NLP_tasks_crs()
7
  supported_langs = list(LANGUAGES.values())
8
 
9
+ with gr.Blocks(css="footer {visibility: hidden}") as demo:
10
+ gr.Markdown("# 🧠 NaanhAI 💡")
11
 
12
  with gr.Row():
13
  with gr.Column():
14
  text = gr.Textbox(label="Your Query", lines=8)
15
  with gr.Column():
16
+ with gr.Accordion("Translation & Summarization Parameters)", open= True):
17
+ language = gr.Dropdown(choices=supported_langs, label="Select Target Language", value="french")
 
18
  style = gr.Textbox(label="Choose Your Style", value="polite")
19
 
20
  with gr.Row(scale=5):
 
50
  outputs=answer
51
  )
52
 
 
53
 
54
  if __name__ == "__main__":
55
+ demo.launch()