Spaces:
Sleeping
Sleeping
Commit
·
2bcf9f3
1
Parent(s):
3ecf953
Trying to load the model directly
Browse files
app.py
CHANGED
|
@@ -6,6 +6,8 @@ from training_data_prep import list_format, modification, league_money, df_gen
|
|
| 6 |
from feature_engineering import heroes, hero_information
|
| 7 |
|
| 8 |
|
|
|
|
|
|
|
| 9 |
def fetch_data(user_id, mmr, comf_1, comf_2, comf_3, comf_4, comf_5):
|
| 10 |
player_id = user_id.split("/")[-1]
|
| 11 |
|
|
@@ -39,30 +41,30 @@ def fetch_data(user_id, mmr, comf_1, comf_2, comf_3, comf_4, comf_5):
|
|
| 39 |
print()
|
| 40 |
|
| 41 |
return player_id
|
| 42 |
-
|
| 43 |
-
demo = gr.Interface(
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
)
|
| 67 |
-
demo.launch()
|
| 68 |
|
|
|
|
| 6 |
from feature_engineering import heroes, hero_information
|
| 7 |
|
| 8 |
|
| 9 |
+
|
| 10 |
+
|
| 11 |
def fetch_data(user_id, mmr, comf_1, comf_2, comf_3, comf_4, comf_5):
|
| 12 |
player_id = user_id.split("/")[-1]
|
| 13 |
|
|
|
|
| 41 |
print()
|
| 42 |
|
| 43 |
return player_id
|
| 44 |
+
demo = gr.Interface.load("https://huggingface.co/nick-leland/RD2L_Random_Forest").launch()
|
| 45 |
+
# demo = gr.Interface(
|
| 46 |
+
# fn=fetch_data,
|
| 47 |
+
# inputs=[
|
| 48 |
+
# gr.Textbox(label="Player ID or Link to OpenDota/Dotabuff"),
|
| 49 |
+
# gr.Textbox(label="MMR"),
|
| 50 |
+
# gr.Slider(1, 5, value=1, step=1, label="Comfort (Pos 1)"),
|
| 51 |
+
# gr.Slider(1, 5, value=1, step=1, label="Comfort (Pos 2)"),
|
| 52 |
+
# gr.Slider(1, 5, value=1, step=1, label="Comfort (Pos 3)"),
|
| 53 |
+
# gr.Slider(1, 5, value=1, step=1, label="Comfort (Pos 4)"),
|
| 54 |
+
# gr.Slider(1, 5, value=1, step=1, label="Comfort (Pos 5)")
|
| 55 |
+
# ],
|
| 56 |
+
# # examples=[
|
| 57 |
+
# # [np.asarray(Image.open("examples/1500_maze.jpg")), "Bulge", True, 0.25, 0.5, 0.5, 0.5],
|
| 58 |
+
# # [np.asarray(Image.open("examples/2048_maze.jpg")), "Bulge", True, 0.25, 0.5, 0.5, 0.5],
|
| 59 |
+
# # [np.asarray(Image.open("examples/2300_fresh.jpg")), "Bulge", True, 0.25, 0.5, 0.5, 0.5],
|
| 60 |
+
# # [np.asarray(Image.open("examples/50_fresh.jpg")), "Bulge", True, 0.25, 0.5, 0.5, 0.5]
|
| 61 |
+
# # ],
|
| 62 |
+
# outputs=[
|
| 63 |
+
# "text"
|
| 64 |
+
# ],
|
| 65 |
+
# title="RD2L Pricing Prediction",
|
| 66 |
+
# article="Uhhhhh this is the article",
|
| 67 |
+
# description="Uhhhhh this is the description"
|
| 68 |
+
# )
|
| 69 |
+
# demo.launch()
|
| 70 |
|