Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,8 @@ import torch.nn as nn
|
|
6 |
import copy
|
7 |
|
8 |
keep_layer_count=6
|
|
|
|
|
9 |
|
10 |
class ByT5ForTextGeotaggingConfig(PretrainedConfig):
|
11 |
model_type = "byt5_for_text_geotagging"
|
@@ -74,7 +76,6 @@ def geolocate_text_byt5(text):
|
|
74 |
logits, (lat, lon) = model(input_tensor.unsqueeze(0), return_coordinates=True)
|
75 |
return lat, lon
|
76 |
|
77 |
-
byt5_tokenizer = AutoTokenizer.from_pretrained("yachay/byt5-geotagging-es", token="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")
|
78 |
model = ByT5ForTextGeotagging.from_pretrained("yachay/byt5-geotagging-es", token="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")
|
79 |
|
80 |
#text = "¡Barcelona es increíble! #VacacionesEnEspaña"
|
|
|
6 |
import copy
|
7 |
|
8 |
keep_layer_count=6
|
9 |
+
byt5_tokenizer = AutoTokenizer.from_pretrained("yachay/byt5-geotagging-es", token="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")
|
10 |
+
|
11 |
|
12 |
class ByT5ForTextGeotaggingConfig(PretrainedConfig):
|
13 |
model_type = "byt5_for_text_geotagging"
|
|
|
76 |
logits, (lat, lon) = model(input_tensor.unsqueeze(0), return_coordinates=True)
|
77 |
return lat, lon
|
78 |
|
|
|
79 |
model = ByT5ForTextGeotagging.from_pretrained("yachay/byt5-geotagging-es", token="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")
|
80 |
|
81 |
#text = "¡Barcelona es increíble! #VacacionesEnEspaña"
|