mgokg commited on
Commit
4283251
·
verified ·
1 Parent(s): f4c1b26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -10,6 +10,7 @@ secreturl = os.environ.get('secret_url')
10
  def parse_links(prompt):
11
  #anfrage ='fill in the missing contact information. do not reference the json object. do not use html tags inside the json object. it must be valid json. do not return explanaitons or any other text. thanks for your efforts:)'
12
  Name=prompt
 
13
  #suite your prompt to your needs
14
  anfrage ="""
15
  instruction: you are a json expert and your job is extracting information from text, generating valid json and return a json object only. do not return any text. halte dich an das vorgegebene json schema.
@@ -52,6 +53,10 @@ def parse_links(prompt):
52
  response = requests.post(url, json=payload, headers=headers)
53
  ergebnis = response.json().get('message')
54
  #ergebnis=gr.Markdown()
 
 
 
 
55
  return ergebnis
56
 
57
  # return as Dictionary, for gr.JSON
 
10
  def parse_links(prompt):
11
  #anfrage ='fill in the missing contact information. do not reference the json object. do not use html tags inside the json object. it must be valid json. do not return explanaitons or any other text. thanks for your efforts:)'
12
  Name=prompt
13
+ outputs.value = "# Bitte warten"
14
  #suite your prompt to your needs
15
  anfrage ="""
16
  instruction: you are a json expert and your job is extracting information from text, generating valid json and return a json object only. do not return any text. halte dich an das vorgegebene json schema.
 
53
  response = requests.post(url, json=payload, headers=headers)
54
  ergebnis = response.json().get('message')
55
  #ergebnis=gr.Markdown()
56
+ ergebnis =ergebnis.replace("[1]", " ")
57
+ ergebnis =ergebnis.replace("[2]", " ")
58
+ ergebnis =ergebnis.replace("[3]", " ")
59
+
60
  return ergebnis
61
 
62
  # return as Dictionary, for gr.JSON