Spaces:
Runtime error
Runtime error
Add some beauty
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def process_tweet(tweet):
|
|
17 |
tweet = re.sub(r'#([^\s]+)', r'\1', tweet)
|
18 |
# trim
|
19 |
tweet = tweet.strip('\'"')
|
20 |
-
return tweet
|
21 |
|
22 |
tokenizer = AutoTokenizer.from_pretrained(
|
23 |
"azamat/geocoder_coordinates_model"
|
@@ -77,10 +77,10 @@ def predict(text):
|
|
77 |
with gr.Blocks() as demo:
|
78 |
|
79 |
gr.Markdown("# **<p align='center'>Twitter geocoding with 🤗 Transformers</p>**")
|
80 |
-
gr.Markdown("
|
81 |
-
gr.Markdown("
|
82 |
-
gr.Markdown("
|
83 |
-
gr.Markdown("
|
84 |
|
85 |
inputs = gr.Textbox(placeholder="Enter the tweet")
|
86 |
outputs = [gr.Dataframe(label="Geocoded data")]
|
|
|
17 |
tweet = re.sub(r'#([^\s]+)', r'\1', tweet)
|
18 |
# trim
|
19 |
tweet = tweet.strip('\'"')
|
20 |
+
return tweet
|
21 |
|
22 |
tokenizer = AutoTokenizer.from_pretrained(
|
23 |
"azamat/geocoder_coordinates_model"
|
|
|
77 |
with gr.Blocks() as demo:
|
78 |
|
79 |
gr.Markdown("# **<p align='center'>Twitter geocoding with 🤗 Transformers</p>**")
|
80 |
+
gr.Markdown("## **<div align='left'>Pipeline consists of:</div>**")
|
81 |
+
gr.Markdown("## **<div align='left'>1) Relevancy scoring model</div>**")
|
82 |
+
gr.Markdown("## **<div align='left'>2) Coordinate predicting model</div>**")
|
83 |
+
gr.Markdown("## **<div align='center'>3) Nominatim API for reverse geocoding lat/lon</div>**")
|
84 |
|
85 |
inputs = gr.Textbox(placeholder="Enter the tweet")
|
86 |
outputs = [gr.Dataframe(label="Geocoded data")]
|