miittnnss commited on
Commit
689df9f
·
1 Parent(s): 43fb718

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  import requests
 
3
  import io
4
  import random
5
  import os
@@ -39,7 +40,9 @@ def extend_prompt(input_text):
39
  response.raise_for_status()
40
 
41
  output = response.json()[0]
42
- return output
 
 
43
 
44
  except requests.exceptions.RequestException as e:
45
  gr.Warning("Cannot extend prompt: Please try again.")
 
1
  import gradio as gr
2
  import requests
3
+ import json
4
  import io
5
  import random
6
  import os
 
40
  response.raise_for_status()
41
 
42
  output = response.json()[0]
43
+
44
+ prompt = output.get("generated_text", "")
45
+ return prompt
46
 
47
  except requests.exceptions.RequestException as e:
48
  gr.Warning("Cannot extend prompt: Please try again.")