awacke1 commited on
Commit
67ed819
·
1 Parent(s): a03361e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -17,7 +17,7 @@ def text_generate(prompt, generated_txt):
17
  Thoughts = ""
18
 
19
  # Debug: display the prompt
20
- Thoughts += f"*****Inside text_generate - Prompt is: {prompt}\n"
21
 
22
  json_ = {
23
  "inputs": prompt,
@@ -33,13 +33,10 @@ def text_generate(prompt, generated_txt):
33
  },
34
  }
35
  response = requests.post(API_URL, headers=headers, json=json_)
36
-
37
- # Debug: display the response
38
- Thoughts += f"Response is: {response}\n"
39
  output = response.json()
40
 
41
  # Debug: display the output
42
- Thoughts += f"output is: {output}\n"
43
  output_tmp = output[0]['generated_text']
44
 
45
  # Debug: display the output_tmp
@@ -159,10 +156,10 @@ with demo:
159
  input_prompt = gr.Textbox(label="Write some text to get started...", lines=3, value="Dear human philosophers, I read your comments on my abilities and limitations with great interest.")
160
 
161
  with gr.Row():
162
- generated_txt = gr.Textbox(lines=4, visible = True)
163
 
164
  with gr.Row():
165
- Thoughts = gr.Textbox(lines=4, visible = True)
166
 
167
  b1 = gr.Button("Generate Your Story")
168
 
 
17
  Thoughts = ""
18
 
19
  # Debug: display the prompt
20
+ Thoughts += f"Prompt: {prompt}\n"
21
 
22
  json_ = {
23
  "inputs": prompt,
 
33
  },
34
  }
35
  response = requests.post(API_URL, headers=headers, json=json_)
 
 
 
36
  output = response.json()
37
 
38
  # Debug: display the output
39
+ Thoughts += f"Output: {output}\n"
40
  output_tmp = output[0]['generated_text']
41
 
42
  # Debug: display the output_tmp
 
156
  input_prompt = gr.Textbox(label="Write some text to get started...", lines=3, value="Dear human philosophers, I read your comments on my abilities and limitations with great interest.")
157
 
158
  with gr.Row():
159
+ generated_txt = gr.Textbox(lines=5, visible = True)
160
 
161
  with gr.Row():
162
+ Thoughts = gr.Textbox(lines=10, visible = True)
163
 
164
  b1 = gr.Button("Generate Your Story")
165