Spaces:
Sleeping
Sleeping
Michael Brunzel
commited on
Commit
·
6619948
1
Parent(s):
3b05c47
Update app
Browse files
app.py
CHANGED
@@ -14,16 +14,14 @@ def evaluate(hotel_request: str, **kwargs):
|
|
14 |
headers={"Authorization": f"Bearer {API_TOKEN}"},
|
15 |
)
|
16 |
|
17 |
-
|
18 |
hotel_request,
|
19 |
**kwargs,
|
20 |
)
|
|
|
|
|
21 |
|
22 |
-
|
23 |
-
output += response.token.text
|
24 |
-
yield output
|
25 |
-
|
26 |
-
return output
|
27 |
|
28 |
gr.Interface(
|
29 |
fn=evaluate,
|
|
|
14 |
headers={"Authorization": f"Bearer {API_TOKEN}"},
|
15 |
)
|
16 |
|
17 |
+
output = hf_client.generate(
|
18 |
hotel_request,
|
19 |
**kwargs,
|
20 |
)
|
21 |
+
text = output.generated_text
|
22 |
+
name, location, hotel, date = text.split("|")
|
23 |
|
24 |
+
return name, hotel, location, date
|
|
|
|
|
|
|
|
|
25 |
|
26 |
gr.Interface(
|
27 |
fn=evaluate,
|