minko186 commited on
Commit
04c7deb
·
verified ·
1 Parent(s): 38d0160

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -8,9 +8,9 @@ def on_first_button_click():
8
  return gr.update(visible=True)
9
 
10
  def ai_article_generator(
11
- text
12
  ):
13
- prompt = f"Write a {text[1]} about the topic in about {text[2]} words: {text[0]}"
14
  ai_text = generate(f"Write an article about the topic: {text}")
15
  ai_text = ai_text.choices[0].message.content
16
  return ai_text
@@ -137,7 +137,9 @@ with gr.Blocks() as demo:
137
  ai_article_btn.click(
138
  fn=ai_article_generator,
139
  inputs=[
140
- [input_topic, input_type, input_length]
 
 
141
  ],
142
  outputs=[ai_label],
143
  )
 
8
  return gr.update(visible=True)
9
 
10
  def ai_article_generator(
11
+ topic, type, length
12
  ):
13
+ prompt = f"Write a {type} about the topic in about {length} words: {topic}"
14
  ai_text = generate(f"Write an article about the topic: {text}")
15
  ai_text = ai_text.choices[0].message.content
16
  return ai_text
 
137
  ai_article_btn.click(
138
  fn=ai_article_generator,
139
  inputs=[
140
+ input_topic,
141
+ input_type,
142
+ input_length
143
  ],
144
  outputs=[ai_label],
145
  )