Spaces:
Sleeping
Sleeping
Georges
commited on
Commit
·
8e79565
1
Parent(s):
a291df5
Fix formating issue
Browse files- src/app.py +3 -3
src/app.py
CHANGED
|
@@ -27,7 +27,7 @@ def text_description_to_locations(description: str) -> list[str]:
|
|
| 27 |
|
| 28 |
text = llm_request(messages)
|
| 29 |
|
| 30 |
-
text = text.
|
| 31 |
|
| 32 |
# return ["Paris, France", "Rome, Italy", "Barcelona, Spain", "Amsterdam, Netherlands"]
|
| 33 |
|
|
@@ -77,7 +77,7 @@ def describe_location_with_llm(location_name: str) -> str:
|
|
| 77 |
|
| 78 |
text = llm_request(messages)
|
| 79 |
|
| 80 |
-
text = text.
|
| 81 |
|
| 82 |
return text
|
| 83 |
|
|
@@ -93,7 +93,7 @@ def llm_request(messages) -> str:
|
|
| 93 |
|
| 94 |
text = pipe(messages, max_new_tokens=max_new_tokens)
|
| 95 |
|
| 96 |
-
return text
|
| 97 |
|
| 98 |
async def main():
|
| 99 |
st.write("""
|
|
|
|
| 27 |
|
| 28 |
text = llm_request(messages)
|
| 29 |
|
| 30 |
+
text = text.strip()
|
| 31 |
|
| 32 |
# return ["Paris, France", "Rome, Italy", "Barcelona, Spain", "Amsterdam, Netherlands"]
|
| 33 |
|
|
|
|
| 77 |
|
| 78 |
text = llm_request(messages)
|
| 79 |
|
| 80 |
+
text = text.strip()
|
| 81 |
|
| 82 |
return text
|
| 83 |
|
|
|
|
| 93 |
|
| 94 |
text = pipe(messages, max_new_tokens=max_new_tokens)
|
| 95 |
|
| 96 |
+
return text[-1]['content']
|
| 97 |
|
| 98 |
async def main():
|
| 99 |
st.write("""
|