Spaces:
Sleeping
Sleeping
Commit
·
67bbd16
1
Parent(s):
0f943ad
Production change
Browse files
app.py
CHANGED
@@ -184,25 +184,27 @@ def predict_cost(user_id, mmr, comf_1, comf_2, comf_3, comf_4, comf_5):
|
|
184 |
Reference Cost: {reference_prediction}
|
185 |
Difference: {diff:.2f} ({(diff/reference_prediction*100):.1f}% {'higher' if predicted_cost > reference_prediction else 'lower'})"""
|
186 |
|
187 |
-
return f"""Predicted Cost: {predicted_cost}{comparison}
|
188 |
-
|
189 |
-
Player Details:
|
190 |
-
- MMR: {mmr}
|
191 |
-
- Position Comfort:
|
192 |
-
* Pos 1: {comf_1}
|
193 |
-
* Pos 2: {comf_2}
|
194 |
-
* Pos 3: {comf_3}
|
195 |
-
* Pos 4: {comf_4}
|
196 |
-
* Pos 5: {comf_5}
|
197 |
-
|
198 |
-
Player Statistics:
|
199 |
-
- Total Games: {total_games}
|
200 |
-
- Overall Winrate: {total_winrate:.1%} if isinstance(total_winrate, float) else 'N/A'
|
201 |
-
|
202 |
-
Note: This prediction is based on historical data and player statistics from OpenDota."""
|
203 |
|
204 |
-
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
# Create Gradio interface
|
208 |
demo = gr.Interface(
|
|
|
184 |
Reference Cost: {reference_prediction}
|
185 |
Difference: {diff:.2f} ({(diff/reference_prediction*100):.1f}% {'higher' if predicted_cost > reference_prediction else 'lower'})"""
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
|
188 |
+
return f"""Predicted Cost: {predicted_cost}"""
|
189 |
+
# return f"""Predicted Cost: {predicted_cost}{comparison}
|
190 |
+
#
|
191 |
+
# Player Details:
|
192 |
+
# - MMR: {mmr}
|
193 |
+
# - Position Comfort:
|
194 |
+
# * Pos 1: {comf_1}
|
195 |
+
# * Pos 2: {comf_2}
|
196 |
+
# * Pos 3: {comf_3}
|
197 |
+
# * Pos 4: {comf_4}
|
198 |
+
# * Pos 5: {comf_5}
|
199 |
+
#
|
200 |
+
# Player Statistics:
|
201 |
+
# - Total Games: {total_games}
|
202 |
+
# - Overall Winrate: {total_winrate:.1%} if isinstance(total_winrate, float) else 'N/A'
|
203 |
+
#
|
204 |
+
# Note: This prediction is based on historical data and player statistics from OpenDota."""
|
205 |
+
#
|
206 |
+
# except Exception as e:
|
207 |
+
# return f"Error in prediction pipeline: {str(e)}\n\nDebug info:\n{type(e).__name__}: {str(e)}"
|
208 |
|
209 |
# Create Gradio interface
|
210 |
demo = gr.Interface(
|