Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
152 |
-
#
|
|
|
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")
|