AV-AV commited on
Commit
4f2b762
·
verified ·
1 Parent(s): fa68b05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -13
app.py CHANGED
@@ -18,7 +18,6 @@ def get_completion_messages_gpt(messages, model="gpt-4o", temperature=0, presenc
18
  stream = stream
19
  )
20
  return response.choices[0].message.content
21
-
22
 
23
  system_message_simple = f"""
24
  You are a Blog editor at Analytics Vidhya. Analytics Vidhya is an edtech platform focussing on creating
@@ -104,18 +103,6 @@ with gr.Blocks() as demo:
104
  with gr.Row():
105
  article_input = gr.Textbox(label="Input Article", lines=15, placeholder="Enter your article here...")
106
 
107
-
108
- # Button to submit and process the article
109
- submit_btn = gr.Button("Submit")
110
-
111
- # Action on submit
112
- submit_btn.click(
113
- process_article,
114
- inputs=[article_input],
115
- outputs=[word_count, language_grammar, word_usage, flow_structure, technical_soundness,
116
- reference_links, faqs, top_suggestions, edited_article, pre_editing_genai, post_editing_genai]
117
- )
118
-
119
  # Outputs in two columns
120
  with gr.Row():
121
  with gr.Column():
@@ -136,6 +123,16 @@ with gr.Blocks() as demo:
136
  gr.Markdown("### Edited Article")
137
  edited_article = gr.Markdown(label="Edited Article")
138
 
 
 
 
 
 
 
 
 
 
 
139
 
140
  # Launch the app
141
  demo.launch()
 
18
  stream = stream
19
  )
20
  return response.choices[0].message.content
 
21
 
22
  system_message_simple = f"""
23
  You are a Blog editor at Analytics Vidhya. Analytics Vidhya is an edtech platform focussing on creating
 
103
  with gr.Row():
104
  article_input = gr.Textbox(label="Input Article", lines=15, placeholder="Enter your article here...")
105
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  # Outputs in two columns
107
  with gr.Row():
108
  with gr.Column():
 
123
  gr.Markdown("### Edited Article")
124
  edited_article = gr.Markdown(label="Edited Article")
125
 
126
+ # Button to submit and process the article
127
+ submit_btn = gr.Button("Submit")
128
+
129
+ # Action on submit
130
+ submit_btn.click(
131
+ process_article,
132
+ inputs=[article_input],
133
+ outputs=[word_count, language_grammar, word_usage, flow_structure, technical_soundness,
134
+ reference_links, faqs, top_suggestions, edited_article, pre_editing_genai, post_editing_genai]
135
+ )
136
 
137
  # Launch the app
138
  demo.launch()