Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import gradio as gr
|
|
| 3 |
import torch
|
| 4 |
from transformers import pipeline, BitsAndBytesConfig, AutoModelForCausalLM, AutoTokenizer
|
| 5 |
|
| 6 |
-
MODEL_ID = "
|
| 7 |
|
| 8 |
bnb_4bit_config = BitsAndBytesConfig(
|
| 9 |
load_in_4bit=True,
|
|
@@ -32,16 +32,10 @@ def infer(prompt):
|
|
| 32 |
return pipe(prompt, max_new_tokens=1, do_sample=True, temperature=1.0, return_full_text=False)[0]["generated_text"]
|
| 33 |
|
| 34 |
default_experiment = """You will take part in a Social Prediction Game.
|
| 35 |
-
You will observe a Player playing against an Opponent
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
The rules change between games, and you will be informed about them before each game.
|
| 39 |
-
The Player varies between blocks but is consistent across games within a block.
|
| 40 |
-
The Opponent switches in each game.
|
| 41 |
Your task is to predict the choices made by the Player.
|
| 42 |
-
You get feedback after each game on whether your prediction was correct or not.
|
| 43 |
-
|
| 44 |
-
Block 1 starts now.
|
| 45 |
|
| 46 |
The rules of the game are as follows:
|
| 47 |
If Player chooses option J and Opponent chooses option J, then Player wins 10 points and Opponent wins 10 points.
|
|
|
|
| 3 |
import torch
|
| 4 |
from transformers import pipeline, BitsAndBytesConfig, AutoModelForCausalLM, AutoTokenizer
|
| 5 |
|
| 6 |
+
MODEL_ID = "unsloth/Meta-Llama-3.1-70B-bnb-4bit"
|
| 7 |
|
| 8 |
bnb_4bit_config = BitsAndBytesConfig(
|
| 9 |
load_in_4bit=True,
|
|
|
|
| 32 |
return pipe(prompt, max_new_tokens=1, do_sample=True, temperature=1.0, return_full_text=False)[0]["generated_text"]
|
| 33 |
|
| 34 |
default_experiment = """You will take part in a Social Prediction Game.
|
| 35 |
+
You will observe a Player playing against an Opponent.
|
| 36 |
+
The Player and the Opponent simultaneously choose between option J and option Z.
|
| 37 |
+
Both parties win points based on their choices.
|
|
|
|
|
|
|
|
|
|
| 38 |
Your task is to predict the choices made by the Player.
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
The rules of the game are as follows:
|
| 41 |
If Player chooses option J and Opponent chooses option J, then Player wins 10 points and Opponent wins 10 points.
|