mgokg commited on
Commit
949d21c
·
verified ·
1 Parent(s): e866bfb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -142,14 +142,15 @@ with gr.Blocks() as demo:
142
 
143
  qwen_client = Client("Qwen/Qwen2.5-72B-Instruct")
144
  result = qwen_client.predict(
145
- query=f"return a valid json objects with contact details foreach verein \n {contact_details}",
146
  history=[],
147
  system="you are a expert for json data and your job is to extract information from text and return a valid json object only. no text no explanations",
148
  api_name="/model_chat"
149
  )
150
- result=gr.Markdown()
151
- return result
152
- # return contact_details
 
153
 
154
  with gr.Row():
155
  clearbutton = gr.Button("Clear")
 
142
 
143
  qwen_client = Client("Qwen/Qwen2.5-72B-Instruct")
144
  result = qwen_client.predict(
145
+ query=f"return a valid json objects with contact details foreach verein. return the generated json only \n {contact_details}",
146
  history=[],
147
  system="you are a expert for json data and your job is to extract information from text and return a valid json object only. no text no explanations",
148
  api_name="/model_chat"
149
  )
150
+ #result=gr.Markdown()
151
+ dict_data = json.loads(result)
152
+ #return result
153
+ return dict_data
154
 
155
  with gr.Row():
156
  clearbutton = gr.Button("Clear")